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 #85652 is a reply to message #85651] Fri, 23 August 2013 11:02 Go to previous messageGo to previous message
Andy Sayer is currently offline  Andy Sayer
Messages: 127
Registered: February 2009
Senior Member
Thanks, will change to do that instead. I'd just thought there may be a way to do it with cgcolourbar, as the image was from the help page for that routine?

Andy

On Friday, August 23, 2013 1:11:40 PM UTC-4, David Fanning wrote:
> 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: Sun Nov 30 21:06:39 PST 2025

Total time taken to generate the page: 0.15985 seconds