Spectrum1

The color scale object Spectrum1 is a graphic object that displays the color map and its numerical scales for color mapped data plots. The color scale displays by default when creating color-filled or gray-scale contour graphs.

Properties:

Property Access Description
Spectrum1.barthick Read/write
numeric

Set the width of the color scale in % of font height.

Spectrum1.lgap Read/write
numeric

Set the gap between the color scale and its associated labels in % of font height.

Spectrum1.loffset Read/write
numeric

Specify a side offset to shift the labels along the direction of color scale object in relation to the center of color scale labels in % of font height.

Spectrum1.revorder Read/write
numeric

Specify whether to reverse the color map and associated labels. 1= Reverse; 0=not Reverse

Spectrum1.title$ Read/write
string

Text to be used as the color scale title

Spectrum1.title Read/write
numeric

Determine whether to show the color scale title. 1=Show, 0=Hide

Spectrum1.levels.major Read/write
numeric

Specify the levels of color scale to show:

  • 1=All Major Levels
  • 2=Partial Total Levels
  • 3=Custom Levels
Spectrum1.levels.partial Read/write
numeric

This is only available when Spectrum1.levels.major=2 (Partial Total Levels is chosen for Show) on. It is used to specify the number of levels in between two adjacent displayed major ticks.

Spectrum1.levels.from[$] Read/write
string/numeric

This is only available when Spectrum1.levels.major=3 (Custom Levels is chosen for Show) on. Specifies the start value for the color scale.

Spectrum1.levels.to[$] Read/write
string/numeric

This is only available when Spectrum1.levels.major=3 (Custom Levels is chosen for Show) on. Specifies the end value for the color scale.

Spectrum1.levels.type Read/write
numeric

This is only available when Spectrum1.levels.major=3 (Custom Levels is chosen for Show) on. Specifies the scale type for color scale.

  • 1 = Linear
  • 2 = Log10
  • 3 = Probability
  • 4 = Probit
  • 5 = Reciprocal
  • 6 = Offset reciprocal
  • 7 = Logit
  • 8 = Ln
  • 9 = Log2
  • 10 = Double Log Reciprocal (Weibull)
Spectrum1.levels.inc Read/write
numeric

This option is only available when Spectrum1.levels.major=3 (Custom Levels is chosen for Show) on. It controls whether to use By Increment as Type. 1 = By Increment, 0 = Other Type.

Spectrum1.levels.inc$ Read/write
string

This option is only available when Spectrum1.levels.major=3 (Custom Levels is chosen for Show) on and Spectrum1.levels.inc=1, Set the major tick increment for this axis.

Spectrum1.levels.majorticks Read/write
numeric

This option is only available when Spectrum1.levels.major=3 (Custom Levels is chosen for Show) on. Set Major tick type as By Counts and specify number of total major ticks.

Spectrum1.levels.ticksbydata$ Read/write
string

This option is only available when Spectrum1.levels.major=3 (Custom Levels is chosen for Show) on. Set Major ticks type as By Dataset and specify the dataset as the major tick positions.

Spectrum1.levels.ticksbylabel Read/write
numeric

This option is only available when Spectrum1.levels.major=3 (Custom Levels is chosen for Show) on. Set Major ticks type as By Plot Column Label and specify the column label row to label major ticks. 1 = Auto, 2 = Long Name, 3 = Units, 4 = Comments, 5 = Sampling Interval, 6 = Parameter.

Spectrum1.levels.firsttick Read/write
numeric

This option is only available when Spectrum1.levels.major=3 (Custom Levels is chosen for Show) on and Major ticks type as By Increment or By Counts. It controls whether to show the first tick. 1 = Show, 0 = Not Show.

Spectrum1.levels.firsttick$ Read/write
string

This option is only available when Spectrum1.levels.major=3 (Custom Levels is chosen for Show) on and Major ticks type as By Increment or By Counts. Specify the position of the first major tick.

Spectrum1.levels.minorticks Read/write
numeric

Specifies the number of minor ticks between two major ticks in color scale.

Spectrum1.levels.mticksbydata$ Read/write
string

Set the positions of the minor ticks using existing dataset or a series of numbers separated by Space.

Spectrum1.labels.autodisp Read/write
numeric

If the value is 1, the display of color scale level labels will follow the settings in the Contour Labels tab in the Plot Details dialog.
If the value is 0, the display of color scale level labels can be customized using the other controls under this Display tree node, and you can refer to the help file of Tick Labels in Axis Dialog for a detailed description on those controls.

Spectrum1.labels.numdisp Read/write
numeric

If Display Type = Numeric, available options include: 1=Decimal:1000, 2=Scientific: 10^3, 3=Engineering:1k, 4=Decimal:1,000, 5=Scientific:1E3, 6=Custom

Spectrum1.labels.decplaces Read/write
numeric

When Display Type = Numeric, and Display is not Custom, specify the number of displayed decimal places.

Spectrum1.labels.cusfmt$ Read/write
string

Specify the user-defined tick label format string, such as setting the number of significant digits or decimal places.

Example

//active a contour graph with color scale
layer.cmap.palette$="Fire.pal";   //load the palette "Fire";
spectrum1.barthick=400;   //change the width of the color scale 
Spectrum1.title=1;   //add the title;
Spectrum1.title$= "New color scale";
Spectrum1.levels.major = 3; // Show Custom Levels
Spectrum1.levels.from = 0; // Specify From
Spectrum1.levels.to = 1; //Specify To
Spectrum1.levels.inc = 1; // Major tick type as By Increment
Spectrum1.levels.inc$ = 0.2; // Set increment
Spectrum1.labels.autodisp = 0; // Uncheck Auto to customize display
Spectrum1.labels.numdisp = 6; //Customize display format
Spectrum1.labels.cusfmt$ = "*2" //Set 2 significant digits