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

Home » Public Forums » archive » Adding extra white in middle of colour bar
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Adding extra white in middle of colour bar [message #85604] Wed, 21 August 2013 03:20 Go to previous message
Sir Loin Steak is currently offline  Sir Loin Steak
Messages: 42
Registered: January 2012
Member
Hi all,

I am plotting data that range from negative to positive, so am using a blue-white-red colour bar. However, I would like there to be more white in the middle of the bar.

At the moment I'm using the following clumsy commands to achieve this:

maxv = 10
cgloadct, 13, /brewer, /reverse, ncolors=9, bottom=0, /silent, clip=[0,225]
cgloadct, 16, /brewer, ncolors=9, bottom=12, /silent, clip=[0,225]
clev = scale_vector(findgen(21), -maxv, maxv)
ccol = bindgen(21)
;Make middle levels white
ccol[9:11] = cgcolor('white')

and then:

cgColorbar, ncolors=20, range=[-maxv, maxv]

While this gives me the plot shading I want, the colour bar is incorrect. As I have manually altered the middle values to white, they don't show in the colour bar, which only uses the 18 colours defined by cgloadct.

Is there a simple way around this?

Thanks.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: spawn not working
Next Topic: Navigating AVIRIS Images

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

Current Time: Wed Oct 08 18:56:15 PDT 2025

Total time taken to generate the page: 0.00486 seconds