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

Home » Public Forums » archive » Colorbar with fixed level and color
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: Colorbar with fixed level and color [message #84197 is a reply to message #81429] Mon, 06 May 2013 16:00 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Sam writes:

> It is working perfect now. Here I have few queries:
>
> 1. To match color of zero level in contour to that with colour bar, I used following commands for my plot and it is working. But colours shift in blue direction in one step.I tried with 'bottom'=2 or =1 in both cases for colourbar and table, but it is not matching together.
>
> nl=13
> level=(findgen(nl)*.5-3)
> colour=(findgen(nl+1))
> cgerase
> cgLoadCT, 24, NColors=14, Bottom=2, /Brewer,/reverse
> cgColorBar,NColors=14, bottom=1, Division=14

I don't have enough information here to answer your question. The levels
you use, the way you load colors, the way you specify colors in the
contour plot, and the way you specify colors in the color bar all work
together. You can see many examples of contour plots and contour colors
(with all manner of color bars) in the IDL plot gallery:

http://www.idlcoyote.com/gallery/index.html

But, I've never had trouble matching the colors of the contour plot
levels to the color bar using Coyote Graphics commands. (I have been
MIGHTLY frustrated with Function Graphics commands, but I don't think
you are asking about those.)

> 2. Can I simply make white on both sides of zero contour?

I don't know what this means or why it is necessary, but, yes, you can
do anything you like with color values.

> 3. The colour you specified are really nice. But can I change those colours a bit, say for both blue or red can they be little lighter? or say can they be purple and orange?

Again, Coyote Graphics routines don't care how you handle your color
tables. You can do anything you like with them. Basically, you just tell
these routines where to find the colors and how many there are. What you
load there is entirely up to you.

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
Read Message
Previous Topic: the problem for GPULIB+IDL
Next Topic: Exponential of very small numbers

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

Current Time: Fri Oct 10 20:01:33 PDT 2025

Total time taken to generate the page: 0.71871 seconds