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 2008

URL: http://cxc.harvard.edu/chips4.1/get_plot.py.html
AHELP for ChIPS 4.1

get_plot

Context: py.chips

Synopsis

Retrieves the attribute value(s) of the plot.

Syntax

get_plot()
get_plot(id [,attribute])

Description

  • id - an optional ChipsId structure containing values to modify the currency state for the command or a string id to specify the plot.
  • attribute - a string containing the name of the attribute to retrieve

The get_plot command returns a structure containing all the attribute values of the plot. To retrieve the value of a specific attribute, provide the attribute name and the id or ChipsId of the object.

Some values are set to "None" in the returned structure. These entries generally correspond to attributes which may only be modified at creation time, such as the object id.

The attributes associated with plots are:

Attribute Description
bottommargin The distance, in Frame Normalized coordinates, between the bottom plot border and the bottom border of the frame containing the plot
corner.style border corner style
leftmargin The distance, in Frame Normalized coordinates, between the left plot border and the left border of the frame containing the plot
rightmargin The distance, in Frame Normalized coordinates, between the right plot border and the right border of the frame containing the plot
style border style
title.angle Angle at which the plot title is drawn
title.color Color of the plot title text string
title.depth Integer value indicating the depth of the plot title
title.font Plot title font
title.fontstyle Specific attributes of the text string independent of size or font
title.halign Horizontal location of the plot title
title.size Font size of the plot title
title.valign Vertical location of the plot title
title.xpos X position, in Frame Normalized coordinates, of the reference point of the plot title
title.ypos Y position, in Frame Normalized coordinates, of the reference point of the plot title
topmargin The distance, in Frame Normalized coordinates, between the upper plot border and the upper border of the frame containing the plot

Note that the plot title is not included in the attributes. In order to get that value, use the get_plot_title command.

To see if a plot is hidden or visible, use the get_plot_visible command.

Advanced Functions

The module of advanced ChIPS functions contains other commands for retrieving attribute values (refer to "ahelp chips" for information on loading the module):

get_plot_axisstyle
get_plot_bottommargin
get_plot_cornerstyle
get_plot_leftmargin
get_plot_rightmargin
get_plot_title_angle
get_plot_title_color
get_plot_title_depth
get_plot_title_font
get_plot_title_fontstyle
get_plot_title_halign
get_plot_title_size
get_plot_title_valign
get_plot_title_xpos
get_plot_title_ypos
get_plot_topmargin

Example 1

chips> add_plot()
chips> print(get_plot())
chips> print(get_plot("plot1","leftmargin"))

A plot is created and becomes current. Calling get_plot with no argument returns all the attributes of the object. get_plot is called a second time to return just the "leftmargin" attribute.

Example 2

chips> add_plot()
chips> add_plot(.2, .2, .7, .7)
chips> print(get_plot("plot1"))

Two plots are created. get_plot is called with the id of the first plot, returning all attributes.

Example 3

chips> id=ChipsId()
chips> id.plot="plot1"
chips> print(get_plot(id))

A ChipsId structure is created and the id.plot field is set to "plot1". get_plot is called with the ChipsId.

Example 4

chips> plotatt = get_plot()
chips> print(plotatt)

Retrieve a structure containing the attribute values of the current plot and store the results in "plotatt". Print the contents of "plotatt".

Bugs

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

Last modified: December 2008



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.