Plot
- class sherpa.plot.Plot[source] [edit on github]
Bases:
NoNewAttributesAfterInit
Base class for line plots
Attributes Summary
The preferences for the plot.
Methods Summary
hline
(y[, xmin, xmax, linecolor, linestyle, ...])Draw a line at constant y, extending over the plot.
overplot
(*args, **kwargs)Add the data to an existing plot.
plot
(x, y[, yerr, xerr, title, xlabel, ...])Plot the data.
vline
(x[, ymin, ymax, linecolor, linestyle, ...])Draw a line at constant x, extending over the plot.
Attributes Documentation
- plot_prefs = {'alpha': None, 'capsize': None, 'color': None, 'ecolor': None, 'label': None, 'linestyle': 'solid', 'linewidth': None, 'marker': 'None', 'markerfacecolor': None, 'markersize': None, 'xerrorbars': False, 'xlog': False, 'yerrorbars': False, 'ylog': False}
The preferences for the plot.
Methods Documentation
- static hline(y, xmin=0, xmax=1, linecolor=None, linestyle=None, linewidth=None, overplot=False, clearwindow=True)[source] [edit on github]
Draw a line at constant y, extending over the plot.
- overplot(*args, **kwargs)[source] [edit on github]
Add the data to an existing plot.
This is the same as calling the plot method with overplot set to True.
See also
- plot(x, y, yerr=None, xerr=None, title=None, xlabel=None, ylabel=None, overplot=False, clearwindow=True, **kwargs)[source] [edit on github]
Plot the data.
- Parameters:
x – The data values to plot. They should have the same length.
y – The data values to plot. They should have the same length.
yerr (optional) – The symmetric errors to apply to the y or x values, or
None
for no errors along the axis. If given, they should match the length of the data.xerr (optional) – The symmetric errors to apply to the y or x values, or
None
for no errors along the axis. If given, they should match the length of the data.title (optional, string) – The optional plot title and axis labels. These are ignored if overplot is set to
True
.xlabel (optional, string) – The optional plot title and axis labels. These are ignored if overplot is set to
True
.ylabel (optional, string) – The optional plot title and axis labels. These are ignored if overplot is set to
True
.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.
See also
- static vline(x, ymin=0, ymax=1, linecolor=None, linestyle=None, linewidth=None, overplot=False, clearwindow=True)[source] [edit on github]
Draw a line at constant x, extending over the plot.