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 #5849 is a reply to message #5846] Fri, 16 February 1996 00:00 Go to previous message
meron is currently offline  meron
Messages: 51
Registered: July 1995
Member
In article <4g2r6b$i1k@maze.dpo.uab.edu>, rkj@dukebar.crml.uab.edu (R. Kyle Justice) writes:
> 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 . . .
>
>
Just do

PLOTS, XARR, YARR [optional keywords here]

By doubling the array (the way you did it) you loop back from your
last point to the first one, introducing an extra straight line. Is
this what happened?

Mati Meron | "When you argue with a fool,
meron@cars3.uchicago.edu | chances are he is doing just the same"
[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 17:24:51 PDT 2025

Total time taken to generate the page: 0.00389 seconds