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

Home » Public Forums » archive » cgcolourbar - examples with text labels aligned inside boxes
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: cgcolourbar - examples with text labels aligned inside boxes [message #85651 is a reply to message #85650] Fri, 23 August 2013 10:11 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
AMS writes:

> I am probably missing something obvious so perhaps someone here can tell me the answer...
>
> I've adopted cgcolourbar as a much nicer way to make colour bars than what I was doing before, via contour. (Thanks, David!)
>
> I now want to do something I didn't try before: I want a 'categorical' type of colour bar, with text to describe each value, rather than the 'continuous' data type. One of the images in the code's documentation shows what I am looking for:
>
> http://www.idlcoyote.com/idldoc/cg/cgcolorbar.html
>
> I'm looking at the example of the months-of-the-year colour bar, the third one down. So, I know I need to set the /discrete keyword. But how do I align the labels (e.g. 'Jan', 'Feb',...) in the middle of the boxes, rather than along the divisions between boxes (like shown on the top example of the page). I looked through the keywords but didn't see anything obvious, and can't find the example code to produce that colour bar. Does anyone know?

Use cgDCBar.

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
Previous Topic: Issue using map_set and !p.multi in combination with polyfill to colour window backgrounds
Next Topic: FONT_SIZE in PLOT()

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

Current Time: Fri Oct 10 20:26:00 PDT 2025

Total time taken to generate the page: 0.32317 seconds