/ sherpa4.16 / faq / plot_multi.html
How can I create multiple plots in the same window?
In the following we assume you have two data sets loaded with ids of 1 (i.e. the default) and 2, that you have done the following
and that fits have been made to both data sets.
If you wish to display multiple datasets in the same plot window then you can use the plot command; for example if you have two datasets with ids of 1 and 2 then:
sherpa> plot("data", 1, "data", 2)
will display each data set in a separate plot in the same window (Figure 1).
Figure 1: Plotting multiple data sets
Parameters can be applied to all plots, such as setting the X-axis to a logarithmic scale:
sherpa> plot("data", 1, "data", 2, xlog=False)
You can display more than two plots, for instance (Figure 2):
sherpa> plot('fit', 1, 'fit', 2, 'delchi', 1, 'delchi', 2)
Figure 2: Plotting fit and residuals
The spacing and layout of the plots can be adjusted using Matplotlib.
/ sherpa4.16 / faq / plot_multi.html