About Chandra Archive Proposer Instruments & Calibration Newsletters Data Analysis HelpDesk Calibration Database NASA Archives & Centers Chandra Science Links

Skip the navigation links
Last modified: December 2007

URL: http://cxc.harvard.edu/chips4.0/set_plot.sl.html
AHELP for ChIPS 4.0 set_plot Context: sl.chips

Synopsis

Modifies the attributes of an existing plot.

Syntax

set_plot([id,] values);

Description

  • id - an optional ChipsId structure containing values to modify the currency state for the command or a string id to modify the specified plot.
  • values - a list containing attribute value pairs or a ChipsPlot object.

The set_plot command sets the specified attributes to the provided values. The modified plot becomes current. Multiple plots may be modified with a single command by setting the currency to "all".

Customizing the Plot

There are several attributes that control the characteristics of plots. The set_plot command may be used to modify the attribute values of an existing plot at any time during a ChIPS session. See "ahelp sl.chips attributes" and "ahelp sl.chips setget" for more general information.

If multiple attributes are being set simultaneously and one of them fails, the entire command will fail and the plot will not be modified.

The attributes associated with plots are:

Attribute Description Options Default
bottommargin The distance, in Frame Normalized coordinates, between the bottom plot border and the bottom border of the frame containing the plot Real values ranging from zero through one 0.15
corner.style border corner style miter|bevel|fill|notch; see below for descriptions miter
leftmargin The distance, in Frame Normalized coordinates, between the left plot border and the left border of the frame containing the plot Zero through one 0.15
rightmargin The distance, in Frame Normalized coordinates, between the right plot border and the right border of the frame containing the plot Real values ranging from zero through one 0.10
style border style open|box|closed; see below for descriptions closed
title.angle Angle at which the plot title is drawn -360.0:360.0 0.0
title.color Color of the plot title text string see the Color section of "ahelp sl.chips chipsopt" white
title.depth Integer value indicating the depth of the plot title see the Depth section of "ahelp sl.chips chipsopt" 100
title.font Plot title font see the Fonts section of "ahelp sl.chips chipsopt" helvetica|courier|times
title.fontstyle Specific attributes of the text string independent of size or font see the Font Style section of "ahelp sl.chips chipsopt" normal
title.halign Horizontal location of the string reference point of the plot title see the Text Alignment section of "ahelp sl.chips chipsopt" center
title.size Font size of the plot title 1:100 16
title.valign Vertical location of the string reference point of the plot title see the Text Alignment section of "ahelp sl.chips chipsopt" auto
title.xpos X position, in Frame Normalized coordinates, of the reference point of the plot title Real values ranging from zero through one 0.5
title.ypos Y position, in Frame Normalized coordinates, of the reference point of the plot title Real values ranging from zero through one 1.05
topmargin The distance, in Frame Normalized coordinates, between the upper plot border and the upper border of the frame containing the plot Real values ranging from zero through one 0.10

These individual commands are also available for setting attribute values:

set_plot_axisstyle
set_plot_bottommargin
set_plot_cornerstyle
set_plot_leftmargin
set_plot_rightmargin
set_plot_title_angle
set_plot_title_color
set_plot_title_depth
set_plot_title_font
set_plot_title_fontstyle
set_plot_title_halign
set_plot_title_size
set_plot_title_valign
set_plot_title_xpos
set_plot_title_ypos
set_plot_topmargin

Plot Borders

Plot borders have three styles: open, box, and closed.

  • open: a plot with no borders
  • box: a plot with four simple lines as borders
  • closed: a plot with four border lines and tick marks

The corners where two lines meet have four styles: miter, bevel, fill, and notch.

  • miter: the end of the axes meet at an angle to form the corner. The slope where the two faces join depends upon the thickness of the two lines
  • bevel: connect the outside corners of the two lines; miter the inside faces to the bevel
  • fill: outside corner with one line drawn over the other
  • notch: leave the corners open

Plot Titles and Axis Labels

The plot title and axis labels are not controlled by an attribute of the set_plot command. They are specified with the set_plot_title, set_plot_xlabel, and set_plot_ylabel commands:

set_plot_title("Figure 1");
set_plot_xlabel("TIME (s)");
set_plot_ylabel("COUNT\\_RATE (count/s)");
      

The value is an alphanumeric string; Latex formatting is allowed. There are many attributes to customize the title via the set_plot command: position, depth, horizontal and vertical alignment, angle, color, size, font and fontstyle.

Example 1

chips> set_plot({"style","box"});

Using attribute/value pairs, set the plot style to box.

Example 2

chips> settings = ChipsPlot;
chips> settings.style = "box";
chips> settings.corner.style = "bevel";
chips> set_plot("plot1",settings);

Populate the "settings" structure with attribute values, then use it to set plot1 to have a box border style with beveled corners.

Example 3

chips>a =struct {style};
chips>a.style="open";
chips>set_plot(a);

Create a user-defined structure with bgcolor and transparency fields. Use the structure to modify the values of the current plot.

Bugs

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

Last modified: December 2007



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-2004. All rights reserved.