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

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


AHELP for CIAO 4.5 ChIPS v1

delete_plot

Context: plots

Synopsis

Delete the specified plot.

Syntax

delete_plot()
delete_plot( [ChipsId] )
delete_plot( "plot_id" )
delete_plot( "all" )

Description

Depending on the argument, the delete_plot command deletes the current plot, the plot indicated in a ChipsId structure or by the plot_id, or all plots.

  • (no argument) - the current plot is deleted.
  • ChipsId - an optional ChipsId structure containing values to modify the currency state for the command.
  • plot_id - identification tag given to each object that is created; use this to delete a specific plot.
  • all - deletes all plots.

There is also a delete_all_plots command, which removes all plots from the specified frame(s). It is equivalent to the command delete_plot("all").

Example 1

chips> add_plot(.1, .1, .5, .5)
chips> delete_plot()

Create a plot, then delete it.

Example 2

chips> id = ChipsId()
chips> add_plot(.1, .1, .5, .5, "id=obs2464")
chips> add_plot(.5, .5, .9, .9, "id=obs2463")
chips> id.plot = "obs2464"
chips> delete_plot(id)

Two plots are created; the second plot is current after it is created. The id.plot command sets the plot value of the ChipsId structure to the first plot. That plot is then deleted.

Example 3

chips> add_plot(.1, .1, .5, .5, "id=obs2464")
chips> add_plot(.5, .5, .9, .9, "id=obs2463")
chips> delete_plot("all")

Two plots are created, then the delete_plot command deletes them both.

Example 4

chips> split()
chips> add_contour([1,4,5,2],2,2)
chips> current_plot("plot2")
chips> add_histogram([1,2,4,-4,2])
chips> delete_all_plots()

Delete all the plots in the current frame.

Example 5

chips> add_frame(0,0,1,.5,'bgcolor=firebrick')
chips> split(1,3)
chips> add_frame(0,.5,1,1,'bgcolor=brown')
chips> split(3)
chips> id=ChipsId()
chips> id.frame='frm1'
chips> delete_all_plots(id)

A ChipsId structure is created and the id.frame field is set to "frm1". delete_all_plots is called with the ChipsId.

Bugs

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

See Also

concepts
chipsid, currency
limits
get_plot_range
plots
add_plot, adjust_grid_gaps, adjust_grid_xrelsize, adjust_grid_xrelsizes, adjust_grid_yrelsize, adjust_grid_yrelsizes, clear_plot, current_plot, display_plot, get_plot, grid_objects, hide_plot, move_plot, reposition_plot, set_data_aspect_ratio, set_plot, set_plot_aspect_ratio, split, strip_chart, swap_object_positions

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.