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

Home » Public Forums » archive » Issues with cgColorbar labels
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
Issues with cgColorbar labels [message #77805] Thu, 22 September 2011 07:02
John Ilee 2 is currently offline  John Ilee 2
Messages: 2
Registered: September 2011
Junior Member
I have been trying to find a simple way of producing a filled contour
plot with a colour bar in IDL for some time. However, I always seem
to run into issues when it comes to the labels on the colour bar.

I have tried the following example from David Fanning's excellent
website...

data = cgDemoData(2)
LoadCT, 0
LoadCT, 33, NColors=10, Bottom=1
c_colors = Indgen(10)+1
position = [0.1, 0.1, 0.9, 0.75]
cgContour, data, NLevels=10, /Fill, Position=position,
C_Colors=c_colors
cgColorbar, Divisions=10, Range=[Min(data), Max(data)], XMinor=1, $
XTickLen=1.0, Position=[0.1, 0.90, 0.9, 0.94], NColors=10,
BOTTOM=1

...which works perfectly.

However, when I try to use the above commands with my own dataset (eg
'data = myarray', which is a 1024x512 array, min value 0.51, max value
1.27), the colour bar labels just display "1" at every tickmark.

If anyone can point me in the direction of a solution, it would be
most appreciated. I know it must be something simple, but I just
can't seem to figure it out.

(I am running IDL 7.1)

Many thanks.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: INSAR-PSI
Next Topic: How to read the Queue Procedures lists of ENVI?

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

Current Time: Wed Oct 08 15:14:48 PDT 2025

Total time taken to generate the page: 0.00518 seconds