also "by_value" palettes are useful when working with discrete data --
http://ferret.pmel.noaa.gov/Ferret/documentation/users-guide/customizing-plots/COLOR#_VPINDEXENTRY_822
Ansley Manke wrote:
Hi David,
It's easy enough to get the color levels themselves that you want, I
think. Ferret treats everything as continuous variables, but it really
comes to the same thing if your data is all integers and the value of
15 is filled with a color that extends from 14.5 to 15.5.
The only real issue then is the labeling of the colorbar, right?
Generating a simple variable and making a SHADE plot, here are the
choices for the colorbar:
yes? let a = x[i=1:5:1] + y[y=1:7:1] - 1
yes? shade/lev=(1,12,1) a
or, more accurately, but not very pretty,
yes? shade/lev=(0.5,11.5,1) a
The colorbar labels don't really have any more control than this. You
can control how many labels there are, and their size and precision;
and the location and size of the colorbar itself,
(http://ferret.pmel.noaa.gov/Ferret/faq/modifying-the-shade-key)
but we
don't have control over what numbers are labeled.
For a final publication plot, one could remove the colorbar labels
using the shakey command, and put new ones on "by hand" with the LABEL
command (or by modifying the plot in another graphics program), but
that's an arduous process.
Anyone else have more ideas??
Ansley
David Wang wrote:
Hi Ferreters,
I generated a 2D field whose values are the number of models (therefore
all discrete integers). I intend to assign a color to each integer
value (e.g., 15) instead of a value range (e.g., 14.5-15.5). In
addition, the colorbar is to be labeled at the middle of each color box
instead of the ends of it. Visually, I want something like this: http://blogs.mathworks.com/images/loren/95/indexTerm_01.png
Is it possible in Ferret?
Thanks!
David
--
life grows, death doesn't.
--
Steve Hankin, NOAA/PMEL -- Steven.C.Hankin@xxxxxxxx
7600 Sand Point Way NE, Seattle, WA 98115-0070
ph. (206) 526-6080, FAX (206) 526-6744
"The only thing necessary for the triumph of evil is for good men
to do nothing." -- Edmund Burke
|