ACT_CBAR Name
ACT_CBAR Purpose
Make a color bar for an absolute color table.
Category
Calling Sequence
act_cbar, vmin, vmax Inputs
vmin Minimum value of color bar parameter. in
vmax Maximum value of color bar parameter. in
Default bar range is original barmin, barmax.
Give 0,0 to get default.
Keyword Parameters
Keywords
/HORIZONTAL Colors vary horizontally (def).
/VERTICAL Colors vary vertical.
/BOTTOM Horizontal axis on bottom (def).
/TOP Horizontal axis on top.
/RIGHT Vertical axis on right (def).
/LEFT Vertical axis on left.
SLOPE=slope, OFFSET=offset Convert color table units.
These keywords allow a single color table to be displayed
in different units by converting the original table units.
Color tables are defined in terms of colors at certain
values where the values are in some units.
Unit conversion: NEW = OLD*slope + offset
Avoid this for log color tables.
Be careful mixing this conversion with the NEWRANGE keyword.
UNITS=units Instead of giving SLOPE and OFFSET may give
units for some color tables that have units conversions.
For example, the color table act_temp_k.txt is an
absolute color table with the following units.
Set units to one of these: 'deg C', 'deg F', 'deg K'
This allows the same color table to be applied to an
array with values in the corresponding units.
NEWRANGE=nran The original color table as given by the
FILE keyword has a data range and a display range,
usually the same but need not be (the table might
also color out of range flag values for example).
Using the data as an absolute color table, only part
of the full color table range might cover the given
data array. The same color table can be remapped to
a new range using the NEWRANGE keyword:
NEWRANGE=[data_lo, data_hi] which applies the
full display range to data_lo to data_hi.
To use only part of the original color table the desired
section may also be given:
NEWRANGE=[data_lo, data_hi, newmin, newmax]
which will use the colors between newmin and newmax
to color data in the range data_lo to data_hi, where
newmin and newmax refer to the original color table,
not the remapped color table.
To use the color table to autoscale the data do
NEWRANGE=[min(z),max(z)] which makes the color table
relative. The new scaling is not remembered on next
call so the original color table is not changed.
/CLIP clip data to specified range (see act_apply).
/KEEP_SCALING Keep color bar axes scaling on exit.
XSAVE=xs, YSAVE=ys, PSAVE=ps returned original scaling.
Use /KEEP to plot in cbar coordinates (x=[0,1],y=[vmn,vmx]).
May then restore original scale: !x=xs & !y=ys & !p=ps
Plus all keywords accepted by PLOT.
Outputs
Common Blocks
Notes
Notes: The color table is set using act_apply.
Bar is positioned using the POSITION keyword.
To display a title use TITLE and so on.
Modification History
R. Sterner, 2007 Dec 21
R. Sterner, 2008 Jan 15 --- Added a min eq max check. No bar.
R. Sterner, 2008 May 21 --- Changed above test to give default bar.
R. Sterner, 2008 May 22 --- Added /CLIP.
R. Sterner, 2008 Jun 05 --- Fixed NEWRANGE when vmin & vmax = 0.
R. Sterner, 2008 Nov 25 --- Better help text for NEWRANGE.
R. Sterner, 2010 Jul 06 --- Added SLOPE=slope, OFFSET=offset for units conversion.
R. Sterner, 2010 Nov 11 --- Made this routine aware of log color tables.
R. Sterner, 2010 Nov 29 --- Added keyword /KEEP_SCALING, and [X|Y|P]SAVE.
R. Sterner, 2010 Dec 14 --- Fixed for the case vmn=vmx=0.
R. Sterner, 2010 Dec 14 --- If /clip given now clips given vmin,vmax to barmin,barmax.
R. Sterner, 2010 Dec 31 --- Added UNITS=units keyword. Applied to barmin/max.
R. Sterner, 2011 Jan 02 --- Fixed the case with vmin, vmax = 0, 0.
R. Sterner, 2011 Jan 07 --- The no units case got broken, fixed.
R. Sterner, 2011 May 13 --- Made color bar values array be 5 pixels wide (was 2).
Was confusing img_shape.pro.
Copyright (C) 2007, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.