MultiPlot
- class sherpa.plot.MultiPlot[source] [edit on github]
Bases:
object
Combine multiple line-style plots.
Allow multiple line-style plots - so those plot classes that use the
plot
method to display - to be drawn in the same area. Each plot is added with the add method.Added in version 4.16.1.
Attributes Summary
Methods Summary
add
(plot)Add the plot to the list of data to plot.
plot
([overplot, clearwindow])Plot the data.
Attributes Documentation
- plots: list[Plot | HistogramPlot]
- title
Methods Documentation
- add(plot: Plot | HistogramPlot) None [source] [edit on github]
Add the plot to the list of data to plot.
A copy of the plot object is stored, rather than the input argument. The
title
attribute can be set or changed.- Parameters:
plot (instance) – The plot or histogram object to add. It must have a
plot
method.
- plot(overplot: bool = False, clearwindow: bool = True, **kwargs) None [source] [edit on github]
Plot the data.
Changed in version 4.17.0: The keyword arguments can now be set per plot by sending in a sequence of values.
- Parameters:
overplot (bool, optional) – If
True
then add the data to an existing plot, otherwise create a new plot.clearwindow (bool, optional) – Should the existing plot area be cleared before creating this new plot (e.g. for multi-panel plots)?
**kwargs – These values are passed on to the plot backend, and must match the names of the keys of the object’s plot_prefs dictionary. If the value is a scalar then the value is sent to each plot, but if it’s a sequence (not a string) then it must match the number of plots and the values are used sequentially.