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

Home » Public Forums » archive » Re: How to plot multiple cgContour plots using the same colour levels (but containing differing data)
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: How to plot multiple cgContour plots using the same colour levels (but containing differing data) [message #76399 is a reply to message #76398] Mon, 30 May 2011 20:25 Go to previous messageGo to previous message
manodeep@gmail.com is currently offline  manodeep@gmail.com
Messages: 33
Registered: June 2006
Member
On May 30, 9:20 pm, Balt <bindermue...@gmail.com> wrote:
> Well, since by clipping to less than the max value I'm always going to
> be below the max color palette entry, out of bounds should not be a
> condition that ever occurs?
>
> Chees
>
> - Balt

The way I have done it in the past is by getting the global (min,max)
of all the data sets. The global min corresponds to color 0 and the
global max to color 255. Now you have to scale the individual data
sets:

Ncolors = 255
data_color_range = (data_max-data_min)/(global_max-
global_min)*Ncolors
data_color_max = (data_max/global_max*Ncolors) < Ncolors
data_color_min = (data_color_max - data_color_range) > 0
data = byte(scale_vector(data,data_color_min,data_color_max))

...rinse, repeat for each data set.

The colorbar can then plotted as usual ranging from global_min to
global_max in data space and 0-Ncolors in color space.

Cheers,
Manodeep
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: call ITK from IDL
Next Topic: Error with cg output and ImageMagick

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

Current Time: Sat Oct 11 04:26:50 PDT 2025

Total time taken to generate the page: 0.40304 seconds