Re: Object graphics color scattergram [message #25444] |
Thu, 14 June 2001 14:52 |
Jeffrey R. Hall
Messages: 5 Registered: June 2001
|
Junior Member |
|
|
And I though I'd covered all the bases before asking.
Thanks for the google pointer, good info.
Jeff
Mark Hadfield wrote:
>
> From: "Jeffrey R. Hall" <jeffrey.r.hall@jpl.nasa.gov>
>>
>> In IDL object graphics, how does one do a scatter plot where
>> the points are colored by some set of values?
>
> This was discussed on the group in March 2000 under the title "Object
> graphic 3d Scatterplot". This Google link may well take you to the thread:
>
> http://groups.google.com/groups?hl=en&lr=&safe=off&a mp;ic=1&th=34049d7674974760,
> 15
>
> Basically the answer is, set the IDLgrSymbol's COLOR property to an array of
> colours. The symbol will cycle through these colours.
>
> ---
> Mark Hadfield
> m.hadfield@niwa.cri.nz http://katipo.niwa.cri.nz/~hadfield
> National Institute for Water and Atmospheric Research
>
> --
> Posted from clam.niwa.cri.nz [202.36.29.1]
> via Mailgate.ORG Server - http://www.Mailgate.ORG
--
Jeffrey.R.Hall@jpl.nasa.gov (818)354-4249
Member Technical Staff, Science Data Processing Systems, Section 388
Jet Propulsion Laboratory, Pasadena, CA 91109, Mail Stop 168-415
http://www-dial.jpl.nasa.gov/~jeff
|
|
|
|
Re: Object graphics color scattergram [message #25449 is a reply to message #25447] |
Wed, 13 June 2001 21:35  |
davidf
Messages: 2866 Registered: September 1996
|
Senior Member |
|
|
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_su rface.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
|
|
|