[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Object graphics color scattergram
- Subject: Re: Object graphics color scattergram
- From: davidf(at)dfanning.com (David Fanning)
- Date: Wed, 13 Jun 2001 22:35:10 -0600
- Newsgroups: comp.lang.idl-pvwave
- Organization: Fanning Software Consulting
- References: <3B280BDC.F6F5B70F@jpl.nasa.gov>
- Xref: news.doit.wisc.edu comp.lang.idl-pvwave:25342
Jeffrey R. Hall (jeffrey.r.hall@jpl.nasa.gov) writes:
>
> In IDL object graphics, how does one do a scatter plot where
> the points are colored by some set of values? Here is an
> example using direct graphics:
>
> DEVICE,PSEUDO=8
> seedx = !pi
> seedy = !pi ^ 2
> x = BYTSCL(RANDOMU(seedx, 100, GAMMA=1))/255.0
> y = BYTSCL(RANDOMN(seedy, 100, GAMMA=1))/255.0
> z = BYTE( x * 255 )
> LOADCT,15
> PLOTS,x,y,COLOR=z,PSYM=1,LINESTYLE=6
>
> I have tried IDLgrPlot with and w/o IDLgrSymbol, and also
> IDLgrPolyline. Lines can be colored, even faded from one
> vertex to the next. But if the lines are omitted then no
> points are drawn, and if IDLgrSymbol is used then they are
> all the same color.
>
> Plus, I need this to be in 24 bit color rather than PSEUDO=8.
I think you just didn't happen onto the correct sequence
of polylines and symbols. Here is an example of an
object graphics scatterplot that I cobbled together
some time ago from my SIMPLE_SURFACE code.
ftp://ftp.dfanning.com/pub/dfanning/outgoing/misc/scatter_surface.pro
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155