comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Help with PLOTS
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Help with PLOTS [message #5838 is a reply to message #5836] Mon, 19 February 1996 00:00 Go to previous messageGo to previous message
Sergei Senin is currently offline  Sergei Senin
Messages: 23
Registered: February 1996
Junior Member
rkj@dukebar.crml.uab.edu (R. Kyle Justice) wrote:
> Can anyone help with the following problem using
> PV-Wave's PLOTS function:
>
> I have two arrays(xarr, yarr), one containing x and the other
> containing y coordinates that I want to plot on top of
> an image.
>
> The following command does not give me what I want and I
> can't figure out why:
>
> PLOTS, [xarr,xarr], [yarr,yarr], /Device
> If I use a loop I get the desired results, but it is
> quite slow at plotting the points:
>
> FOR i=0,N_ELEMENTS(xarr)-1 DO PLOTS, $
> [xarr(i),xarr(i)], [yarr(i),yarr(i)], /Device
>
> (xarr and yarr have the same number of elements)
>
> I know there has to be a way to plot the points
> using array notation without looping . . .
> Kyle J.
>
>

I just tried it:
;;image from pv-wave examples
openr, 1, filepath('head.img', subdir='data')
head_ls=bytarr(512, 512)
readu, 1, head_ls
close, 1
tv, head_ls
a=findgen(100)
c=a^3
b=a^2
plots, a, c
plots, a, b

It gave me two curves (c and b) plotted over this image

When I used "device" keyword, it...well... didn't work. (I think the
explanation is in the Reference book)

Making plots as

plots, [a, a] , [b, b]

gives two curves: a=a and b=a^2



--
S.S.
ss@ee.port.ac.uk
http://www.ee.port.ac.uk:80/~ss-www/ruspage.html
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Help with FSLIDER
Next Topic: Using callable IDL from C / how to avoid IDL start up screen ?

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 19:34:59 PDT 2025

Total time taken to generate the page: 0.00371 seconds