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

Home » Public Forums » archive » Scaling cgColorbar to match data
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: Scaling cgColorbar to match data [message #89407 is a reply to message #89403] Wed, 08 October 2014 20:40 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Richard writes:

> I'm attempting to generate a plot with varying symbol colours. I've
been able to scale my large range of data points to a 256 colour table
but I haven't got the foggiest as how to scale the cgColorbar to match.
At the bottom of this post is a simple example of what I'm attempting to
do.

I'm not sure I'm seeing what you are seeing, but I would change this
code:

> cgloadct, col, NColors=ncol
>
> PLOTSYM, 0, /FILL
>
> FOR i=0,49 DO BEGIN
> cgplot,[x[i]],[y[i]],PSYM = 8,/OVERPLOT,color=FIX(Colors_test[i])
> ENDFOR

To this:

cgloadct, col, NColors=ncol
FOR i=0,49 DO BEGIN
cgplot,[x[i]],[y[i]],PSYM = 16,/OVERPLOT,color=BYTE(Colors_test[i])
ENDFOR

Does that make any difference?

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: cgimage - /quite keyword
Next Topic: Calculate the size of text-output

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

Current Time: Fri Oct 10 02:52:59 PDT 2025

Total time taken to generate the page: 0.24171 seconds