The Colorbar widget controls the color environment for the application. Pseudocolor8, Truecolor8, Truecolor16, and Truecolor24 visuals are supported.The Colorbar widget supports a variety of colormap formats including colormaps from SAOImage, SAOtng/Ximtool, and other display programs. There are a number of built-in maps, and new maps may be loaded, edited, and saved.
In a Pseudocolor environment, the widget will request a minimum number of colors in the default colormap. If these are not available, it will use a private colormap. The private colormap will be populated with colors from the current colormap to minimize color flashing.
synopsis
colorbarpseudocolor8
Create magnifier canvas widget for pseudocolor or truecolor visual.
colorbartruecolor8
colorbartruecolor16
colorbartruecolor24
Syntax: standard canvas widget options, see canvas(n) for more info.
-width width of magnifier, default 512
-height height of magnifier, default 22
-x location of anchor point in canvas, default 1
-y location of anchor point in canvas, default 1
-anchor anchor mode, default nw
-tags canvas tag
-command tcl command for this widget, default 'colorbar'
-min minimum number of colors, default 80
-max maximum number of colors, default 200
-private (colorbarpseudocolor8 only) use private colormap, default false
-privatecolors (colorbarpseudocolor8 only) number of colors in private colormapExample: create colorbarpseudocolor8 -width 500 -height 20 -private
create colorbartruecolor16 -width 500 -height 20commands
adjust get colormap get height get id get invert get name get file name get width hide itt list load map reset save set colormap show version adjust
Adjust the contrast and bias for the current distribution of colors within the colorbar.
Syntax: adjust numeric numeric
Example: colorbar adjust 1 .5get colormap
Returns the following information: colormap id, bias, contrast, invert, pointer to color cells, number of color cells. The output of this command is input for the frame colormap command.
Example: colorbar get colormapget height
Returns current colorbar height.
Example: colorbar get heightget id
Returns current colormap id.
Example: colorbar get idget invert
Returns true if current colormap is inverted.
Example: colorbar get invertget name
Returns colormap name.
Syntax:
get name Return current colormap name
get name integer Return colormap id name
Example: colorbar get name
colorbar get name 5get file name
Returns current colormap file name.
Example: colorbar get file nameget width
Return current colorbar width
Example: colorbar get widthhide
Hide the colorbar if visible. No effect otherwise.
Example: colorbar hideinvert
Invert the current colormap.
Syntax: invert [true | false | yes | no | on | off | 1 | 0]
Example: colorbar invert yesitt
Use a RTD ITT colormap
Syntax:
itt name use itt name
itt integer use itt id
Example: colorbar itt foo.itt
colorbar itt 4list
Return list of loaded colormaps.
Syntax:
list Return list of colormap names
list id Return list of colormap ids
list name Return list of colormap names
list itt Return list of itt colormap names
list itt id Return list of itt colormap ids
list itt name Return list of itt colormap names
Example: colorbar list name
colorbar list idload
Load new colormap.
Syntax:
load filename Load SAOimage colormap file
load filename type Load colormap of type (lut, lasc, other) file
load itt filename Load ITT colormap file
Example: colorbar load foo.lutmap
Set the current colormap.
Syntax:
map name Use colormap name. The name is case insensitive.
map id Use colormap id
Example: colorbar map heatreset
Reset the colorbar.
Example: colorbar resetsave
Save the current colormap to a file.
Syntax: save filename
Example: colorbar map heatset colormap
Set the current colormap.
Syntax:
set colormap name numeric numeric integer Set colormap name, bias, contrast, invert
set colormap integer numeric numeric integer Set colormap id, bias, contrast, invert
set colormap window windowname Apply colomap name to tk window name
Example: colorbar set colormap heat 1 .5 0
colorbar set colormap .simpleshow
Show the colorbar if previously hidden. No effect otherwise.
Example: colorbar showversion
Return the current colorbar verison.
Example: colorbar version