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

Home » Public Forums » archive » Plotting with colorbar
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Plotting with colorbar [message #87213] Thu, 16 January 2014 07:41 Go to previous message
atmospheric physics is currently offline  atmospheric physics
Messages: 121
Registered: June 2010
Senior Member
Hello,

I have a data matrix with 99 columns and 86400 rows (each row represents time in seconds). The whole of the data matrix is arranged with only 5 numbers = [-9, 1, 2, 3, 4]. I wanted to make a color bar with 4 colors = ['DARK RED','RED','SKY BLUE', 'BLUE'] representing numbers [1, 2, 3, 4] respectively and -9 represents a missing value (assigned 'WHITE' color)

Below are my lines in the code for synthetic data:

time=LINDGEN(86400) ; in seconds

tmp_data=REPMAT([-9,1,2,3,4],20,86400)
data=tmp_data[0:98,*]

missingIndices=WHERE(data EQ -9, missingCount)
IF missingCount GT 0 THEN data[missingIndices]=0

img=BytScl(data,MIN=0,MAX=4,/NAN)

TVLCT, cgColor('WHITE',/Triple),0 ; Background color
TVLCT, cgColor(['DARK RED','RED','SKY BLUE','BLUE'],/Triple),1

???
???

Now my problem is ... I want X-axis with time, Y-axis with data column indices (i.e., indgen(99)) where I wanted to place colored dots (basing on the colorbar) for each of the data point column wise for all the time points. Can anyone suggest me how shall I proceed after the above steps in simplest way?

Thanks in advance
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Maps - ellipsoids in map_set ('scale on the central meridian')
Next Topic: averaging w.r.t time resolution

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

Current Time: Wed Oct 08 15:36:16 PDT 2025

Total time taken to generate the page: 0.00439 seconds