Last modified: 12 December 2018

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("", "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.