Re: Image plot colour scale

Hi Oliver,

> I have an image plot which shows the magnitude of the data using an RGB
> map.
> The user can modify the ranges of the plot scales, thus dynamically
> changing the value each colour represents.
> I’d like to add a colour scale next to the plot so that it always shows
> the correct values the colous represents.This is because in most cases
> the plot is saved as a GIF and printed for analysis later…
> Is there a builtin feature of visad to do this ?

Unfortunately, VisAD does not have a built-in color scale
for its displays. There are (at least) two things you can

1. Construct a LabeledColorWidget and put it in a JPanel
with the DisplayImpl. You may want to call the setMaximumSize()
method of the LabeledColorWidget to minimize the amount of
screen space used for the interactive color graphs (i.e.,
only show the color wedge).

2. Build a small oblong image with a wedge of values of the
RealType you have mapped to RGB, and place it in a corner
of your display. It will appear as a color wedge. You'd have
to explicitly construct any Text labels.

Good luck,

  • 2003 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the visad archives: