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

Home » Public Forums » archive » color by variable interpolate?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
color by variable interpolate? [message #50131] Tue, 12 September 2006 06:02
daisybug1 is currently offline  daisybug1
Messages: 1
Registered: September 2006
Junior Member
Hello all,

I have been trying to wrap my mind around how to make this work, but
have not figured it out and hoped that someone could give me a little
help.

I'm trying to color some data by temperature...

x y t
5 8 -2.5
6 6 -1.3
2 4 -5.3
10 6 -3.5

I'm using the rainbow color table and want the warmest value -1.3 to
correspond to the color 255 (red) and the coldest value -5.3 to
correspond to the color 12 (dark purple)

varyc=-255./(abs(max(t)-min(t))
plot,x,y,/nodata

for i=0, n_elements(x)-1 do begin
plots,x[i],y[i],psym=sym(3),color=T[i]*(varyc)
endfor

That's what I have so far, but it doesn't allow me to start the lower
values exactly at the number I want for example in this case 12, and
skews the data so that the temperatures don't fully encompass the
temperature scale. I'm not even sure if this is the best way to do
this (a for loop). I tried to pass the temperature array as a color,
but I"m really missing the point of starting the lowest value at some
low color number and the highest at 255. I have an incling that it may
have to do with interpolation. Any help would be greatly appreciated!
Thank you everyone!
Jon
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: increase the number of major tickmarks in plots
Next Topic: undefining a variable

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

Current Time: Fri Oct 10 15:58:05 PDT 2025

Total time taken to generate the page: 0.39802 seconds