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

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


AHELP for CIAO 4.9 ChIPS v1

delete_plot

Context: plots

Synopsis

Delete the specified plot.

Syntax

delete_plot()
delete_plot(id)

delete_all_plots()
delete_all_plots(id)

Description

The function arguments.

Argument Description
id A ChipsId structure identifying the item, or a string containing the name of the object.

If no argument is given then the current plot is deleted, otherwise the argument determines what to delete.

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(0.1, 0.1, 0.5, 0.5)
chips> delete_plot()

Create a plot, then delete it.

Example 2

chips> delete_plot('plot2')

Delete the plot called plot2.

Example 3

chips> id = ChipsId()
chips> add_plot(0.1, 0.1, 0.5, 0.5, "id=obs2464")
chips> add_plot(0.5, 0.5, 0.9, 0.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 4

chips> add_plot(0.1, 0.1, 0.5, 0.5, "id=obs2464")
chips> add_plot(0.5, 0.5, 0.9, 0.9, "id=obs2463")
chips> delete_plot("all")

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

Example 5

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 6

chips> add_frame(0, 0, 1, 0.5, 'bgcolor=firebrick')
chips> split(1, 3)
chips> add_frame(0, 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 2013
Smithsonian Institute Smithsonian Institute

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