Chandra X-Ray Observatory (CXC)
Skip to the navigation links
Last modified: December 2012

URL: http://cxc.harvard.edu/chips/set_preferences.html
Jump to: Description · Examples · Bugs · See Also


AHELP for CIAO 4.5 ChIPS v1

set_preferences

Context: preference

Synopsis

Sets the specified preferences.

Syntax

set_preferences(list)
set_preferences(string)
set_preferences(object)

Description

The set_preferences command 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 argument may be:

  • list - pairs consisting of a string specifying the attribute followed by a value, e.g. ["point.color", "red", "point.size", 3].
  • string - string containing a single attribute/value entry, e.g. "point.fill=false".
  • object - an attribute object containing the appropriate attributes with desired settings.

When using an object, only members not set to "None" are used to update preferences.

The save_preferences and load_preferences commands may be used to save and reload ChIPS preferences, respectively.

The following attribute objects are supported:

  • ChipsWindow
  • ChipsFrame
  • ChipsPlot
  • ChipsAxis
  • ChipsCurve
  • ChipsHistogram
  • ChipsImage
  • ChipsContour
  • ChipsLabel
  • ChipsLine
  • ChipsPoint
  • ChipsRegion
  • ChipsColorBar
  • ChipsExport
  • ChipsInfo
  • ChipsPreferences

The ChipsPreferences object contains fields for all the objects and for the ancillary preferences such as "export" and "info".

The meanings of the various fields of these objects are given in "ahelp preferences" and "ahelp set_<object>" (e.g. "ahelp set_image"). The ChIPS Dictionary ("ahelp chipsopt") lists the allowed values for colors, fonts, line styles, etc.

Example 1

chips> set_preferences(["point.color", "red", "point.size", 3])

Set the default point color to red and the size to 3.

Example 2

chips> set_preferences("point.fill=false")

By default, points will not be filled.

Example 3

chips> set_preferences("axis.*.thickness=2")

Change all the thickness elements of the axis to use a thickness of 2 by default.

Example 4

chips> axp = ChipsAxis()
chips> axp.label.color = "red"
chips> axp.offset.perpendicular = 10
chips> set_preferences(axp)

Using the axp object, set the default axis label color to red and the perpendicular offset to 10.

Bugs

See the bugs pages on the ChIPS website for an up-to-date listing of known bugs.

See Also

concepts
preferences, setget
preference
get_preference, get_preferences, load_preferences, save_preferences, set_preference, set_preference_autoload
utilities
set_current

Last modified: December 2012
CXC logo

The Chandra X-Ray Center (CXC) is operated for NASA by the Smithsonian Astrophysical Observatory. 60 Garden Street, Cambridge, MA 02138 USA.   Email: cxcweb@head.cfa.harvard.edu Smithsonian Institution, Copyright © 1998-2012. All rights reserved.