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 #67699 is a reply to message #67698] Wed, 12 August 2009 00:49 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
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.")
[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: Mon Oct 13 02:34:35 PDT 2025

Total time taken to generate the page: 1.84319 seconds