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

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


AHELP for CIAO 4.9 ChIPS v1

reverse_axes

Context: axes

Synopsis

Reverses the direction of one or more axes.

Syntax

reverse_axes()
reverse_axes(dimension)
reverse_axes(id)
reverse_axes(id, dimension)

Description

The function arguments.

Argument Description
dimension One of X_AXIS, Y_AXIS, or XY_AXIS to specify the X axis, Y axis, or both.
id A ChipsId structure identifying the item.

The reverse_axes command modifies the plot display so that the specified axis and all corresponding data are transposed. That is, data that increases to the right will increase to the left and vice-versa. Reversing the axis a second time returns the axis display to its original setting. All objects within a data system defined by a reversed axis are modified as appropriate.

Reversing axes does not change currency of the axes within a plot, but may change the currency of the plot, frame, or window being accessed.

Example 1

chips> reverse_axes()

Reverse the x and y axes, as well as all objects in the associated data systems.

Example 2

chips> add_axis(X_AXIS, 1, 1, 10)
chips> add_axis(X_AXIS, 0, 1, 10)
chips> add_axis(Y_AXIS, 0, 1, 10)
chips> x = np.arange(-4, 4)
chips> add_curve(x, x**2)
chips> current_axis("ax1")
chips> add_line(1, 9, 10, 16, "color=coral")
chips> id = ChipsId()
chips> id.axis = "ax2"
chips> reverse_axes(id, X_AXIS)

Create a plot containing two x-axes, then add a curve in the coordinate system of the second x-axis and a line in the coordinate system of the first. Use a ChipsId structure to reverse the second x-axis.

Bugs

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

See Also

axes
add_axis, bind_axes, current_axis, delete_axis, display_axis, display_major_ticks, display_minor_ticks, get_axis, get_xaxis, get_yaxis, hide_axis, hide_major_ticks, hide_minor_ticks, lin_scale, log_scale, move_axis, set_arbitrary_tick_positions, set_axis, set_xaxis, set_yaxis, shuffle_axis, unbind_axes

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.