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

Home » Public Forums » archive » Re: different plotting symbols for different points
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: different plotting symbols for different points [message #67698 is a reply to message #67694] Wed, 12 August 2009 02:50 Go to previous messageGo to previous message
maurya is currently offline  maurya
Messages: 16
Registered: February 2009
Junior Member
On 12 Aug, 12:49, David Fanning <n...@dfanning.com> wrote:
> maurya writes:
>>  Is there any routine that can be used to represent every points in 2D
>> plot by different symbols?
>
>>   Actually, I want to plot two array (say, xarr and yarr) of length 80
>> using different symbols (or numbers 1, 2,...80) so that I can identify
>> every points in 2D. One way is to use xyouts. But it will be more
>> useful if the is any routine.
>
> How about this:
>
> PRO PlotNumbers, x, y
>
>    IF N_Elements(y) EQ 0 THEN y = RandomU(-3L, 80) * 100
>    npts = N_Elements(y)
>    IF N_Elements(x) EQ 0 THEN x = Indgen(npts)
>    Plot, x, y, BACKGROUND=FSC_Color('ivory'), COLOR=FSC_Color('navy')
>    OPlot, x, y, COLOR=FSC_Color('ivory'), PSYM=SymCat(15), SYMSIZE=2.0
>    XYouts, x, y, StrTrim(Sindgen(npts)+1, 2), COLOR=FSC_Color('red'), $
>         ALIGN=0.5, CHARSIZE=0.75
>
> END
>
> You can find FSC_Color, SymCat, and other programs you need in
> the Coyote Library.
>
>   http://www.dfanning.com/catalysy/howtoinstall.html
>
> Cheers,
>
> David
>
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming:http://www.dfanning.com/
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")

Thanks David!
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Voxels in IDL
Next Topic: What in the world does "Program code area full" mean?

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

Current Time: Fri Oct 10 17:39:29 PDT 2025

Total time taken to generate the page: 0.36850 seconds