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

Can I have multiple plots with a common X axis?


The strip_chart command creates multiple plots which share a common axis (the default is to use the X axis but the Y axis can be chosen instead). The common axess for all the plots are bound together so that the same range and scaling values are used in all plots. This enusures that common features are aligned vertically (or horizontally).

As an example, consider displaying the ra, dec, and roll columns of a Chandra aspect solution file as a function of time:

chips> clear()
chips> add_window(8, 11, "inches")
chips> strip_chart(3)
chips> set_preference("curve.symbol.style", "none")
chips> add_curve("asol1.fits[cols time, ra]")
chips> current_plot("plot2")
chips> add_curve("asol1.fits[cols time, dec]")
chips> current_plot("plot3")
chips> add_curve("asol1.fits[cols time, roll]")
chips> get_plot_xrange()
          [229752886.9687652, 229802569.41289756]
chips> limits(X_AXIS, 2.2976e8, 2.2977e8)
[Three plots, vertically aligned all with the same X-axis range]

The ChIPS gallery contains more examples, in particular the Sharing an axis between plots section.



Last modified: 14 December 2016
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.