Concepts: Preferences
The ChIPS preference file contains default values for object
attributes, such as line color, label font, and point symbol.
It also contains export settings for printing: output file
format, margins, orientation, etc. A list of all the
preferences is available below.
The preference file format is "resource : value", with
one entry per line:
window.display : true
window.smoothing : false
window.height : 360
window.width : 360
window.scaleheight : 1.25
window.scalewidth : 1.25
window.units : pixels
window.stem : win
...
Comment lines begin with a pound sign (#) and empty lines are ignored.
Setting Preferences
The set_preferences() command
(Python
or
S-Lang)
sets the
specified preference to the supplied value. The new setting
does not affect the attributes of existing objects and data,
only new ones created after the call to set_preferences. The
command takes one of the following arguments:
-
a list of pairs consisting of a string specifying the
attribute followed by a value,
e.g. ["point.color","red","point.size",3] .
-
a string containing a single attribute/value entry,
e.g. "point.fill=false" .
-
an attribute object containing the appropriate
attributes with desired settings.
The values concept
document provides details on the range of various preferences,
such as
color
and
line style.
# Python
set_preferences(["curve.symbol.style","circle"])
set_preferences("frame.bgcolor=red")
% S-Lang
set_preferences({"curve.symbol.style","circle"});
set_preferences("frame.bgcolor=red");
Saving Preferences
The save_preferences command
(Python
or
S-Lang)
saves ChIPS preferences to the specified file. If no filename is
supplied, ChIPS attempts to save to $HOME/.chips.rc.
If the output file exists, ChIPS behavior is determined by the
value of the export.clobber preference. If
set to true, ChIPS will attempt to overwrite the existing
file.
Loading Preferences
The load_preferences command
(Python
or
S-Lang)
loads ChIPS preferences from the specified file. If no filename is
supplied, ChIPS attempts to load $HOME/.chips.rc.
Retrieving Preferences
The get_preferences call takes the name of a preference and
returns the current default setting. If no argument is given,
all of the preferences and values are returned. If an object
stem is given (e.g. "plot"), all the preferences that contain
that stem are returned: label.stem, label.font,
label.color, etc.
# Python
get_preferences()
get_preferences("window.bgcolor")
get_preferences("label")
% S-Lang
get_preferences();
get_preferences("window.bgcolor");
get_preferences("label");
Supported Preferences
The following preferences are supported for each ChIPS object.
Window Preferences
| Attribute |
Description |
Default |
| window.display |
Display window when created or wait until redraw is enabled |
true |
| window.stem |
Stem to use for window ids |
win |
| window.bgcolor |
Window background color
|
default |
| window.height |
Height of window in window.units |
360 |
| window.width |
Width of window in window.units |
360 |
| window.units |
Units for window height and width |
pixels |
| window.scaleheight |
Scale factor so screen displayed windows appear close to actual size |
1.25 |
| window.scalewidth |
Scale factor so screen displayed windows appear close to actual size |
1.25 |
Frame Preferences
| Attribute |
Description |
Default |
| frame.stem |
stem to use for frame ids |
frm |
| frame.bgcolor |
frame background color
|
default |
| frame.border.color |
color of border edge on frame |
default |
| frame.border.visible |
should frame border be visible |
false |
| frame.aspect |
should frames preserve aspect ratio during tiling |
true |
| frame.scale |
scale labels when frame size changes vs maintaining font size |
true |
| frame.transparency |
Make the frame background transparent rather than opaque |
false |
Plot Preferences
| Attribute |
Description |
Default |
| plot.stem |
stem to use for plot ids |
plot |
| plot.style |
appearance of border edges on plot |
closed |
| plot.corner.style |
appearance of plot border corners |
miter |
| plot.leftmargin |
distance from left edge of frame to left plot border |
0.15 |
| plot.rightmargin |
distance from right edge of frame to right plot border |
0.10 |
| plot.topmargin |
distance from top edge of frame to top plot border |
0.10 |
| plot.bottommargin |
distance from bottom edge of frame to bottom plot border |
0.15 |
| plot.title.xpos |
normalized x reference location for plot title |
0.5 |
| plot.title.ypos |
normalized y reference location for plot title |
1.05 |
| plot.title.angle |
angle for plot title |
0 |
| plot.title.halign |
horizontal alignment with regards to title location |
auto |
| plot.title.valign |
vertical alignment with regards to title location |
auto |
| plot.title.color |
color of plot title text |
default |
| plot.title.size |
size of the plot title |
16 |
| plot.title.font |
font of the plot title |
helvetica |
| plot.title.fontstyle |
font style of the plot title |
normal |
Axis Preferences
| Attribute |
Description |
Default |
| axis.x.stem |
stem to use for x axis ids |
ax |
| axis.y.stem |
stem to use for y axis ids |
ay |
| axis.color |
color of axis baseline |
default |
| axis.thickness |
Thickness of axis baseline |
1 |
| axis.depth |
depth of axis |
default |
| axis.label.color |
color of axis label |
default |
| axis.label.size |
font size of axis label |
14 |
| axis.label.font |
font of axis label |
helvetica |
| axis.label.fontstyle |
font style of axis label |
normal |
| axis.label.halign |
horizontal alignment of axis label |
center |
| axis.label.valign |
vertical alignment of axis label |
center |
| axis.majorgrid.visible |
display grids at major tick mark locations |
false |
| axis.majorgrid.color |
color of major grid lines |
default |
| axis.majorgrid.style |
line style of major grid lines |
shortdash |
| axis.majorgrid.thickness |
thickness of major grid lines |
1 |
| axis.minorgrid.visible |
display grids at minor tickmark locations |
false |
| axis.minorgrid.color |
color of minor grid lines |
default |
| axis.minorgrid.style |
line style of minor grid lines |
dot |
| axis.minorgrid.thickness |
thickness of minor grid lines |
1 |
| axis.automin |
automatically adjust minimum value based of added curve, contour, or histogram |
true |
| axis.automax |
automatically adjust maximum value based of added curve, contour, or histogram |
true |
| axis.pad |
pad factor to add to axes in arbitrary, limits, or interval modes |
0.05 |
| axis.offset.pllel |
axis label position offset along range of axis (-.5:.5) |
0 |
| axis.offset.perpendicular |
distance of axis label from axis baseline (in pixels) |
40 |
| axis.tickformat |
format string for tick labels |
%g |
| axis.ticklabel.style |
place tick labels inside or outside of plot. |
outside |
| axis.ticklabel.color |
color of tick labels |
default |
| axis.ticklabel.size |
font size of tick labels |
12 |
| axis.ticklabel.angle |
angle of tick labels |
0 |
| axis.ticklabel.halign |
horizontal alignment for ticklabels |
auto |
| axis.ticklabel.valign |
vertical alignment for ticklabels |
auto |
| axis.ticklabel.font |
font for tick labels |
helvetica |
| axis.ticklabel.fontstyle |
font style of tick labels |
normal |
| axis.ticklabel.offset |
distance of ticklabel from axis baseline (in pixels) |
6 |
| axis.majortick.mode |
tick mode of the major ticks |
limits |
| axis.majortick.interval |
interval to use when majortick.mode is interval |
10 |
| axis.majortick.count |
number of ticks to draw when majortick.mode is count |
4 |
| axis.majortick.thickness |
thickness of major tick marks |
1 |
| axis.majortick.color |
color of major tick marks |
default |
| axis.majortick.style |
Should major tick marks be drawn inside, outside, or centered on the axis baseline |
inside |
| axis.majortick.length |
specifies the length of the axis major tick |
5 |
| axis.majortick.visible |
display axis major tick marks |
true |
| axis.minortick.mode |
specifies minor tick mode if major tick mode is interval or count |
count |
| axis.minortick.interval |
specifies interval between minor ticks if minor tick mode is interval |
5 |
| axis.minortick.count |
the number of minor ticks between major ticks if minor tick mode is count |
4 |
| axis.minortick.thickness |
thickness of minor ticks |
1 |
| axis.minortick.color |
color of minor ticks |
default |
| axis.minortick.style |
should minor tick marks be drawn inside, outside, or centered on
the axis baseline |
inside |
| axis.minortick.length |
length of minor ticks |
3 |
| axis.minortick.visible |
disply minor ticks |
true |
Curve Preferences
| Attribute |
Description |
Default |
| curve.stem |
stem to use for curve ids |
crv |
| curve.baddata |
ignore or omit bad data points |
omit |
| curve.depth |
depth of curve |
default |
| curve.line.color |
color of trace connecting data points in curve |
default |
| curve.line.thickness |
thickness of trace connecting data points in curve |
1 |
| curve.line.style |
line style of trace connecting data points in curve |
solid |
| curve.symbol.color |
color of symbols used for curve data points |
default |
| curve.symbol.style |
style of symbol used for curve data points |
cross |
| curve.symbol.size |
size of curve symbol |
2 |
| curve.symbol.angle |
angle to apply to the curve symbols |
0 |
| curve.symbol.fill |
filled or unfilled symbols |
true |
| curve.err.style |
error bar style (bar/line or capped) |
line |
| curve.err.up |
display y up errors if present in data |
on |
| curve.err.down |
display y down errors if present in data |
on |
| curve.err.left |
display x down errors if present in data |
on |
| curve.err.right |
display x up errors if present in data |
on |
| curve.err.color |
color of error bars |
default |
| curve.err.thickness |
thickness of curve error bars |
1 |
| curve.limit.length |
length of limits symbols as plot normalized percentage |
0.05 |
| curve.limit.override |
do limits symbols override the opposite error bar for the same point |
true |
Histogram Preferences
| Attribute |
Description |
Default |
| histogram.stem |
stem to use for histogram ids |
hist |
| histogram.depth |
depth of histogram |
default |
| histogram.line.color |
color of histogram trace |
default |
| histogram.line.thickness |
thickness of histogram trace |
1 |
| histogram.line.style |
line style of trace representing data in histograms |
solid |
| histogram.symbol.color |
color of symbol for histograms |
default |
| histogram.symbol.style |
style of symbols for histgram |
none |
| histogram.symbol.size |
size of histogram symbol |
2 |
| histogram.symbol.angle |
angle to apply to histogram symbol |
0 |
| histogram.symbol.fill |
fill or unfilled symbols |
false |
| histogram.err.style |
display y up errors if present in data |
line |
| histogram.err.up |
display y up errors if present in data |
on |
| histogram.err.down |
display y down errors if present in data |
on |
| histogram.err.color |
color of error bars |
default |
| histogram.err.thickness |
error thickness |
1 |
| histogram.dropline |
extend bin edge to 0 for connected bins |
off |
Contour Preferences
| Attribute |
Description |
Default |
| contour.stem |
stem to use for contour ids |
ctr |
| contour.color |
color of contour levels |
default |
| contour.thickness |
thickness of contour levels |
1 |
| contour.style |
line style of levels |
solid |
| contour.levels |
number of contour levels when mode is count |
5 |
| contour.algorithm |
algorithm to use for contours |
standard |
| contour.mode |
mode for calculating contour levels |
nice |
| contour.interval |
interval to use between levels when mode is interval |
10 |
| contour.depth |
depth of the contour |
default |
Label Preferences
| Attribute |
Description |
Default |
| label.stem |
stem to use for label ids |
lbl |
| label.font |
font to use for label |
helvetica |
| label.color |
color to use for label |
default |
| label.size |
font size of label |
12 |
| label.fontstyle |
font style of label |
normal |
| label.angle |
angle of label |
0 |
| label.halign |
horizontal alignment of label |
left |
| label.valign |
vertical alignment of label |
base |
| label.depth |
depth of label |
default |
Line Preferences
| Attribute |
Description |
Default |
| line.stem |
stem to use for line ids |
line |
| line.color |
color of line |
default |
| line.thickness |
thickness of line |
1 |
| line.depth |
depth of line |
default |
| line.style |
style of line |
solid |
| line.extend |
extend type for line |
none |
Point Preferences
| Attribute |
Description |
Default |
| point.stem |
stem to use for point ids |
pnt |
| point.color |
color of point symbol |
default |
| point.style |
style of symbol |
cross |
| point.size |
size of point |
2 |
| point.fill |
filled or unfilled |
true |
| point.angle |
angle to rotate point by |
0 |
| point.depth |
depth of point |
default |
Region Preferences
| Attribute |
Description |
Default |
| region.stem |
stem to use for region ids |
reg |
| region.fill.visible |
display the fill area within a region |
false |
| region.fill.color |
color to use for region fill |
green |
| region.edge.thickness |
thickness of the line specifying the region edge |
1 |
| region.edge.style |
line style to use for the region edge |
solid |
| region.edge.color |
color of the line representing the region edge |
green |
| region.depth |
depth where the region should be placed |
default |
Export Preferences
More information can be found in the
Export section
of the values Concept documentation.
| Attribute |
Description |
Default |
| export.fonts |
write ps fonts to output file |
false |
| export.format |
specifies the export file format |
ps |
| export.orientation |
portrait or landscape mode |
portrait |
| export.colorscheme |
rgb or cmyk color scheme |
rgb |
| export.leftmargin |
left page margin for output |
0.0 |
| export.rightmargin |
right page margin for output |
0.0 |
| export.topmargin |
top page margin for output |
0.0 |
| export.bottommargin |
bottom page margin for output |
0.0 |
| export.pagewidth |
page width for output |
0.0 |
| export.pageheight |
page height for output |
0.0 |
| export.scaleheight |
scales height for output |
0.0 |
| export.scalewidth |
scales width for output |
|
0.0 |
| export.fittopage |
adjust output to fit pagesize |
false |
| export.keepaspect |
preserve aspect ratios in output |
true |
Info Preferences
| Attribute |
Description |
Default |
| info.coord |
display coordinate system data in info results |
false |
| info.current |
reverse video for current objects in info results |
false |
| info.depth |
display depth in info results |
false |
Miscellaneous Preferences
| Attribute |
Description |
Default |
| foreground.display |
default foreground color for screen displays |
white |
| background.display |
default background color for screen displays |
black |
| foreground.file |
default foreground color for output files/hardcopies |
black |
| background.file |
default background color for output files/hardcopies |
white |
| pick.mask |
event mask to use for pick points operation |
BTNS_DOWN|KEY_PRESS |
| default.depth |
depth to use for objects with depth of default(0) |
100 |
| default.verbosity |
verbosity level for error handling |
2 |
|