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

Home » Public Forums » archive » scatter plot , intensity colors. Help
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: scatter plot , intensity colors. Help [message #86527 is a reply to message #86523] Fri, 15 November 2013 08:54 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Lim writes:

> 1. Colors: I have updated my coyote library. Now I can see the colors. Thanks.
>
> 2. Colorbar: To be honest I do not have a clear idea about how to include the color bar with the colors matching those I used in the intensity. I will appreciate any suggestions.

I would probably do it like this:

;----------------------------------------------------------- ---
X=[2, 4, 5, 6, 7, 8]
Y=[20, 40, 45, 30, 10, 5]
I=[100,200,300,400,500,600]

;intensity color
colors = cgScaleVector(Findgen(N_Elements(I)), Min(I), Max(I))
clr = Value_Locate(colors, I)
clr = Byte(Round(cgScaleVector(clr, 0, 255)))
TVLCT, r, g, b, /Get
TVLCT, r[clr], g[clr], b[clr], 1
TVLCT, r, g, b, /Get

cgWindow, 'TVLCT', r, g, b


;the scatterplot
cgPlot, X, Y, /Nodata, /AddCMD, Position=[0.125, 0.125, 0.9, 0.8]
FOR j=0,N_Elements(X)-2 DO cgPlotS, [X[j], X[j+1]], [Y[j], Y[j+1]], $
Color=clr[j+1], Psym=16,symsize=2,/AddCMD
FOR j=0,N_Elements(pNPP)-1,2 DO cgPlotS, X[j], Y[j], $
Color=clr[j+1], Psym=16,symsize=2, /AddCMD

cgDCBar, NColors=N_Elements(clr), Bottom=1, /AddCmd
END
;----------------------------------------------------------- ---

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
Read Message
Read Message
Read Message
Read Message
Previous Topic: =?UTF-8?Q?How=20to=20use=20IDL=20to=20?==?UTF-8?Q?call=20?= =?UTF-8?Q?SQL=5FServer=5F2008=20datab?==?UTF-8?Q?ase?=
Next Topic: reading in from multiple files, performing operations and printing them to multiple output file

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

Current Time: Wed Oct 08 19:00:13 PDT 2025

Total time taken to generate the page: 0.00924 seconds