PylabErrorArea

class sherpa.plot.pylab_area_backend.PylabErrorArea[source] [edit on github]

Bases: PylabBackend

A Matplotlib backend displaying data uncertainties as shaded regions

This class changes the behavior of the plotting in a way that is not possible with just setting parameters alone: For 1D data with y-errors the error range is not shown with error bars as in sherpa.plot.backends.PylabBackend, but instead with shaded regions.

This class does not display x errors, even if they are given.

Attributes Summary

name

An easy-to-read string name for a plotting backend.

translate_dict

Dict of keyword arguments that need to be translated for this backend.

Methods Summary

as_html(data, fields)

Create HTML representation of a plot

as_html_cdf(data[, summary, func])

as_html_contour(data[, summary, func])

as_html_contour1d(data[, summary, func])

as_html_contour2d(data[, summary, func])

as_html_data(data[, summary, func])

as_html_datacontour(data[, summary, func])

as_html_fit(data[, summary, func])

as_html_fitcontour(data[, summary, func])

as_html_histogram(data[, summary, func])

as_html_image(data[, summary, func])

as_html_lr(data[, summary, func])

as_html_model(data[, summary, func])

as_html_modelcontour(data[, summary, func])

as_html_pdf(data[, summary, func])

as_html_plot(data[, summary, func])

as_html_plot_or_contour(data[, summary, func])

Create HTML representation of a contour

as_svg(func)

Create HTML representation of a plot

clear_window()

Clear default pyplot figure.

colorlist(n)

Generate the list of n colors for use in multi-line plots.

contour(x0, x1, y, *[, levels, title, ...])

Draw 2D contour data.

find_zorder(axes)

Try to come up with a good zorder value

get_cdf_plot_defaults()

get_component_histo_defaults()

get_component_plot_defaults()

get_confid_contour_defaults()

get_confid_plot_defaults()

get_confid_point_defaults()

get_contour_defaults()

get_data_contour_defaults()

get_data_plot_defaults()

get_fit_contour_defaults()

get_fit_plot_defaults()

get_histo_defaults()

get_html(attr)

get_image_defaults()

Currently, there are no configurable settings

get_latex_for_string(txt)

Convert LaTeX formula

get_model_contour_defaults()

get_model_histo_defaults()

get_model_plot_defaults()

get_plot_defaults()

get_point_defaults()

get_ratio_contour_defaults()

get_ratio_plot_defaults()

get_resid_contour_defaults()

get_resid_histo_defaults()

get_resid_plot_defaults()

get_rmf_plot_defaults()

get_scatter_plot_defaults()

get_split_plot_defaults()

histo(xlo, xhi, y, *[, yerr, title, xlabel, ...])

Draw histogram data.

hline(y, *[, xmin, xmax, linecolor, ...])

Draw a horizontal line

image(x0, x1, y, *[, aspect, title, xlabel, ...])

Draw 2D image data.

initialize_plot(dataset, ids)

Create the plot window or figure for the given dataset.

plot(x, y, *[, yerr, xerr, title, xlabel, ...])

Draw x, y data.

select_plot(dataset, ids)

Select the plot window or figure for the given dataset.

set_jointplot(row, col, nrows, ncols[, ...])

Move to the plot, creating them if necessary.

set_subplot(row, col, nrows, ncols[, ...])

Select a plot space in a grid of plots or create new grid

set_title(title)

Change the display title.

setup_axes(overplot, clearwindow)

Return the axes object, creating it if necessary.

setup_plot(axes[, title, xlabel, ylabel, ...])

Basic plot setup.

vline(x, *[, ymin, ymax, linecolor, ...])

Draw a vertical line

Attributes Documentation

name

Alternative string names for plotting backend.

This differs from the class name, because external code such as ciao_contrib scripts might depend on this name being present.

translate_dict = {'label': {None: '_nolegend_'}, 'linestyle': {'None': ' ', 'dash': '--', 'dashdot': '-.', 'dot': ':', 'noline': ' ', 'solid': '-'}}

Dict of keyword arguments that need to be translated for this backend.

The keys in this dict are keyword arguments(e.g. 'markerfacecolor') and the values are one of the following: - A dict where the keys are the backend-independent values and the values are the values expressed for this backend. For values not listed in the dict, no translation is done. - A callable. The callable translation function is called with any argument given and allows the backend arbitrary translations. It should, at the very least, accept all backend independent values for this parameter without error.

Example:

>>> translate_dict = {'markerfacecolor': {'k': (0., 0., 0.)},
...                   'alpha': lambda a: 256 * a}

This translates the color ‘k’ to tuple of RGB values and alpha values to a number between 0 and 256.

Methods Documentation

as_html(data, fields) [edit on github]

Create HTML representation of a plot

Parameters:
  • data (Plot instance) – The plot object to display.

  • fields (sequence of strings) – The fields of data to use.

as_html_cdf(data, summary=None, *, func='plot') [edit on github]
as_html_contour(data, summary=None, *, func='contour') [edit on github]
as_html_contour1d(data, summary=None, *, func='plot') [edit on github]
as_html_contour2d(data, summary=None, *, func='contour') [edit on github]
as_html_data(data, summary=None, *, func='plot') [edit on github]
as_html_datacontour(data, summary=None, *, func='contour') [edit on github]
as_html_fit(data, summary=None, *, func='plot') [edit on github]
as_html_fitcontour(data, summary=None, *, func='contour') [edit on github]
as_html_histogram(data, summary=None, *, func='plot') [edit on github]
as_html_image(data, summary=None, *, func='plot') [edit on github]
as_html_lr(data, summary=None, *, func='plot') [edit on github]
as_html_model(data, summary=None, *, func='plot') [edit on github]
as_html_modelcontour(data, summary=None, *, func='contour') [edit on github]
as_html_pdf(data, summary=None, *, func='plot') [edit on github]
as_html_plot(data, summary=None, *, func='plot') [edit on github]
as_html_plot_or_contour(data, summary=None, func='plot') [edit on github]

Create HTML representation of a contour

The output is a SVG representation of the data, as a HTML svg element.

Parameters:
  • data (Contour instance) – The contour object to display. It has already had its prepare method called.

  • summary (str or None, optional) – The summary of the detail. If not set then the data type name is used.

  • func (str, optional) – The function to call on the data object to make the plot.

Returns:

plot – The HTML, or None if there was an error (e.g. prepare not called).

Return type:

str or None

as_svg(func) [edit on github]

Create HTML representation of a plot

The output is a SVG representation of the data, as a HTML svg element, or a single div pointing out that the plot object has not been prepared.

Parameters:

func (function) – The function, which takes no arguments, which will create the plot. It creates and returns the Figure.

Returns:

plot – The HTML, or None if there was an error (e.g. prepare not called).

Return type:

str or None

clear_window() [edit on github]

Clear default pyplot figure.

colorlist(n) [edit on github]

Generate the list of n colors for use in multi-line plots.

Generally, the color will be ordered in some way and do not repeat or do so only after a large number of colors. Different backends might generate different lists of colors.

Parameters:

n (int) – Number of colors requested

Returns:

colors – list of color specifiers

Return type:

list

contour(x0, x1, y, *, levels=None, title=None, xlabel=None, ylabel=None, overcontour=False, clearwindow=True, xlog=False, ylog=False, alpha=None, linewidths=None, linestyles='solid', colors=None, label=None) [edit on github]

Draw 2D contour data.

Parameters:
  • x0 (array-like) – independent axis in the first dimenation (on regular grid, flattened)

  • x1 (array-like) – independent axis in the second dimenation (on regular grid, flattened)

  • y (array-like) – dependent axis (i.e. image values) (on regular grid, flattened)

  • levels (array-like, default=None) – Levels at which to draw the contours

  • title (str, default=None) – Plot title (can contain LaTeX formulas). Only used if a new plot is created.

  • xlabel (str, default=None) – Axis label (can contain LaTeX formulas). Only used if a new plot is created.

  • ylabel (string, default=None) – Axis label (can contain LaTeX formulas). Only used if a new plot is created.

  • overcontour (, default=False)

  • clearwindow (bool, default=True) – If True the entire figure area is cleared to make space for a new plot.

  • xlog (bool, default=False) – Should the x axis be logarithmic (default: linear)? Only used if a new plot is created.

  • ylog (bool, default=False) – Should the y axis be logarithmic (default: linear)? Only used if a new plot is created.

  • alpha (float, default=None) – Number between 0 and 1, setting the transparency.

  • linewidths (, default=None)

  • linestyles (, default=solid)

  • colors (, default=None)

  • label (str, default=None) – Label this dataset for use in a legend

find_zorder(axes) [edit on github]

Try to come up with a good zorder value

Parameters:

axes – The plot axes

Returns:

zorder – The estimated zorder value.

Return type:

float or None

Notes

The following is from https://github.com/sherpa/sherpa/issues/662 which is circa matplotlib 3. The issue is how to ensure that a plot with multiple data values (e.g. a fit plot with data+error bars and model, and one with multiple fits), are drawn “sensibly” so that the user can make out the model. For this we really want the zorder of plot items to be determined by the order they are added. However, this appears to be complicated by the fact that the errorbar command creates multiple objects (for the point, error bars, and I believe caps), and not just a Line2D object. Once all the plot items are concatenated and sorted to ensure a consistent ordering - as discussed in https://github.com/matplotlib/matplotlib/issues/1622#issuecomment-142469866 - we lose a “nice” order in Sherpa (for our cases it does not seem to help that the error bar adds in a zorder Line2D of 2.1 as compared to 2, which means that the point for the error bar is drawn on top of the error bar, but also above other lines added to the plot.

One option would be to evaluate the current plot to find out what the minimum zorder is, and explicitly set larger values. Note that the default zindex values appear to be 2 and 2.1 from plot/errorbar. This should work for the case of plot something overplot something but may fall apart as soon as users add their own features to the visualization, but that may be acceptable.

get_cdf_plot_defaults() [edit on github]
get_component_histo_defaults() [edit on github]
get_component_plot_defaults() [edit on github]
get_confid_contour_defaults() [edit on github]
get_confid_plot_defaults() [edit on github]
get_confid_point_defaults() [edit on github]
get_contour_defaults() [edit on github]
get_data_contour_defaults() [edit on github]
get_data_plot_defaults() [edit on github]
get_fit_contour_defaults() [edit on github]
get_fit_plot_defaults() [edit on github]
get_histo_defaults() [edit on github]
get_html(attr) [edit on github]
get_image_defaults() [edit on github]

Currently, there are no configurable settings

get_latex_for_string(txt) [edit on github]

Convert LaTeX formula

Parameters:

txt (str) – The text component in LaTeX form (e.g. r’lpha^2’). It should not contain any non-LaTeX content.

Returns:

latex – The text modified as appropriate for a backend so that the LaTeX will be displayed properly.

Return type:

str

get_model_contour_defaults() [edit on github]
get_model_histo_defaults() [edit on github]
get_model_plot_defaults() [edit on github]
get_plot_defaults() [edit on github]
get_point_defaults() [edit on github]
get_ratio_contour_defaults() [edit on github]
get_ratio_plot_defaults() [edit on github]
get_resid_contour_defaults() [edit on github]
get_resid_histo_defaults() [edit on github]
get_resid_plot_defaults() [edit on github]
get_rmf_plot_defaults() [edit on github]
get_scatter_plot_defaults() [edit on github]
get_split_plot_defaults() [edit on github]
histo(xlo, xhi, y, *, yerr=None, title=None, xlabel=None, ylabel=None, overplot=False, clearwindow=True, xerrorbars=False, yerrorbars=False, ecolor=None, capsize=None, barsabove=False, xlog=False, ylog=False, linestyle='solid', drawstyle='default', color=None, alpha=None, marker='None', markerfacecolor=None, markersize=None, label=None, linewidth=None, linecolor=None) [edit on github]

Draw histogram data.

The histogram is drawn as horizontal lines connecting the start and end points of each bin, with vertical lines connecting consecutive bins. Non-consecutive bins are drawn with a (NaN, NaN) between them so no line is drawn connecting them.

Points are drawn at the middle of the bin, along with any error values.

Note that the linecolor is not used, and is only included to support old code that may have set this option (use color instead).

Parameters:
  • x0 (array-like or scalar number) – lower bin boundary values

  • x1 (array-like or scalar number) – upper bin boundary values

  • y (array-like or scalar number) – y values, same dimension as x0.

  • yerr (float or array-like, shape(N,) or shape(2, N), default=None) –

    The errorbar sizes can be:
    • scalar: Symmetric +/- values for all data points.

    • shape(N,): Symmetric +/-values for each data point.

    • shape(2, N): Separate - and + values for each bar. First row contains the lower errors, the second row contains the upper errors.

    • None: No errorbar.

    Note that all error arrays should have positive values.

  • title (str, default=None) – Plot title (can contain LaTeX formulas). Only used if a new plot is created.

  • xlabel (str, default=None) – Axis label (can contain LaTeX formulas). Only used if a new plot is created.

  • ylabel (string, default=None) – Axis label (can contain LaTeX formulas). Only used if a new plot is created.

  • overplot (bool, default=False) – If True, the plot is added to an existing plot, if not a new plot is created.

  • clearwindow (bool, default=True) – If True the entire figure area is cleared to make space for a new plot.

  • xerrorbars (bool, default=False) – Should x error bars be shown? If this is set to True errorbars are shown, but only if the size of the errorbars is provided in the xerr parameters. The purpose of having a separate switch xerrorbars is that the prepare method of a plot can create the errors and pass them to this method, but the user can still decide to change the style of the plot and choose if error bars should be displayed.

  • yerrorbars (bool, default=False) – Should y error bars be shown? If this is set to True errorbars are shown, but only if the size of the errorbars is provided in the yerr parameters. The purpose of having a separate switch yerrorbars is that the prepare method of a plot can create the errors and pass them to this method, but the user can still decide to change the style of the plot and choose if error bars should be displayed.

  • ecolor (str, default=None) – Color of the error bars.

  • capsize (float, default=None) – Size of the cap drawn at the end of the error bars.

  • barsabove (, default=False)

  • xlog (bool, default=False) – Should the x axis be logarithmic (default: linear)? Only used if a new plot is created.

  • ylog (bool, default=False) – Should the y axis be logarithmic (default: linear)? Only used if a new plot is created.

  • linestyle (str, default=solid) – 'noline', 'None' (as string, same as 'noline'), 'solid', 'dot', 'dash', 'dashdot', '-' (solid line), ':' (dotted), '--' (dashed), '-.' (dashdot), '' (empty string, no line shown), None (default - usually solid line) or any other matplotlib linestyle.

  • drawstyle (str, default=default) – matplolib drawstyle

  • color (str or tuple, default=None) – Any matplotlib color

  • alpha (float, default=None) – Number between 0 and 1, setting the transparency.

  • marker (str, default=None) – “None” (as a string, no marker shown), “” (empty string, no marker shown), or any matplotlib marker, e.g. any of os+v or others (see matplotlib documentation).

  • markerfacecolor (string, default=None) – see color

  • markersize (float, default=None) – Size of a marker. The scale may also depend on the backend. None uses the backend-specific default.

  • label (str, default=None) – Label this dataset for use in a legend

  • linewidth (float, default=None) – Thickness of the line.

  • linecolor (str or tuple, default=None) – Any matplotlib color

hline(y, *, xmin=0, xmax=1, linecolor=None, linestyle=None, linewidth=None, overplot=False, clearwindow=True) [edit on github]

Draw a horizontal line

Parameters:
  • y (float) – x position of the vertical line in data units

  • xmin (float, default=0) – Beginning of the horizontal line in axes coordinates, i.e. from 0 (left) to 1 (right).

  • xmax (float, default=1) – End of the vertical line in axes coordinates, i.e. from 0 (left) to 1 (right).

  • linecolor (str or tuple, default=None) – Any matplotlib color

  • linestyle (str, default=None) – 'noline', 'None' (as string, same as 'noline'), 'solid', 'dot', 'dash', 'dashdot', '-' (solid line), ':' (dotted), '--' (dashed), '-.' (dashdot), '' (empty string, no line shown), None (default - usually solid line) or any other matplotlib linestyle.

  • linewidth (float, default=None) – Thickness of the line.

  • overplot (bool, default=False) – If True, the plot is added to an existing plot, if not a new plot is created.

  • clearwindow (bool, default=True) – If True the entire figure area is cleared to make space for a new plot.

image(x0, x1, y, *, aspect='auto', title=None, xlabel=None, ylabel=None, clearwindow=True, overplot=False, **kwargs) [edit on github]

Draw 2D image data.

Warning

This function is a non-functional dummy. The documentation is provided as a template only.

Parameters:
  • x0 (array-like) – independent axis in the first dimension

  • x1 (array-like) – independent axis in the second dimension

  • y (array-like, with shape (len(x0), len(x1))) – dependent axis (i.e. image values) in 2D with shape (len(x0), len(x1))

  • aspect (str or float, default=auto) – Aspect ratio of the plot. Strings “equal” or “auto” are accepted.

  • title (str, default=None) – Plot title (can contain LaTeX formulas). Only used if a new plot is created.

  • xlabel (str, default=None) – Axis label (can contain LaTeX formulas). Only used if a new plot is created.

  • ylabel (string, default=None) – Axis label (can contain LaTeX formulas). Only used if a new plot is created.

  • clearwindow (bool, default=True) – If True the entire figure area is cleared to make space for a new plot.

  • overplot (bool, default=False) – If True, the plot is added to an existing plot, if not a new plot is created.

  • kwargs (dict, optional) – All other keyword parameters are passed to the plotting library.

initialize_plot(dataset, ids) [edit on github]

Create the plot window or figure for the given dataset.

Parameters:
  • dataset (str or int)

  • dataset. (The)

  • ids (array_like)

  • object. (The identifier array from the DataStack)

See also

select_plot

plot(x, y, *, yerr=None, xerr=None, title=None, xlabel=None, ylabel=None, overplot=False, clearwindow=True, xerrorbars=False, yerrorbars=False, xlog=False, ylog=False, linestyle='solid', drawstyle='default', color=None, ecolor=None, marker='None', markerfacecolor=None, markersize=None, alpha=None, label=None, linewidth=None, capsize=None, barsabove=False)[source] [edit on github]

Draw x, y data.

This method combines a number of different ways to draw x/y data:
  • a line connecting the points

  • scatter plot of symbols

  • errorbars

All three of them can be used together (symbols with errorbars connected by a line), but it is also possible to use only one or two of them. By default, a line is shown (linestyle='solid'), but marker and error bars are not (marker='None' and xerrorbars=False as well as yerrorbars=False).

Note that the linecolor is not used, and is only included to support old code that may have set this option (use color instead).

Parameters:
  • x (array-like or scalar number) – x values

  • y (array-like or scalar number) – y values, same dimension as x.

  • yerr (float or array-like, shape(N,) or shape(2, N), default=None) –

    The errorbar sizes can be:
    • scalar: Symmetric +/- values for all data points.

    • shape(N,): Symmetric +/-values for each data point.

    • shape(2, N): Separate - and + values for each bar. First row contains the lower errors, the second row contains the upper errors.

    • None: No errorbar.

    Note that all error arrays should have positive values.

  • xerr (float or array-like, shape(N,) or shape(2, N), default=None) –

    The errorbar sizes can be:
    • scalar: Symmetric +/- values for all data points.

    • shape(N,): Symmetric +/-values for each data point.

    • shape(2, N): Separate - and + values for each bar. First row contains the lower errors, the second row contains the upper errors.

    • None: No errorbar.

    Note that all error arrays should have positive values.

  • title (str, default=None) – Plot title (can contain LaTeX formulas). Only used if a new plot is created.

  • xlabel (str, default=None) – Axis label (can contain LaTeX formulas). Only used if a new plot is created.

  • ylabel (string, default=None) – Axis label (can contain LaTeX formulas). Only used if a new plot is created.

  • overplot (bool, default=False) – If True, the plot is added to an existing plot, if not a new plot is created.

  • clearwindow (bool, default=True) – If True the entire figure area is cleared to make space for a new plot.

  • xerrorbars (bool, default=False) – Should x error bars be shown? If this is set to True errorbars are shown, but only if the size of the errorbars is provided in the xerr parameters. The purpose of having a separate switch xerrorbars is that the prepare method of a plot can create the errors and pass them to this method, but the user can still decide to change the style of the plot and choose if error bars should be displayed.

  • yerrorbars (bool, default=False) – Should y error bars be shown? If this is set to True errorbars are shown, but only if the size of the errorbars is provided in the yerr parameters. The purpose of having a separate switch yerrorbars is that the prepare method of a plot can create the errors and pass them to this method, but the user can still decide to change the style of the plot and choose if error bars should be displayed.

  • ecolor (str, default=None) – Color of the error bars.

  • capsize (float, default=None) – Size of the cap drawn at the end of the error bars.

  • barsabove (, default=False)

  • xlog (bool, default=False) – Should the x axis be logarithmic (default: linear)? Only used if a new plot is created.

  • ylog (bool, default=False) – Should the y axis be logarithmic (default: linear)? Only used if a new plot is created.

  • linestyle (str, default=solid) – 'noline', 'None' (as string, same as 'noline'), 'solid', 'dot', 'dash', 'dashdot', '-' (solid line), ':' (dotted), '--' (dashed), '-.' (dashdot), '' (empty string, no line shown), None (default - usually solid line) or any other matplotlib linestyle.

  • drawstyle (str, default=default) – matplolib drawstyle

  • color (str or tuple, default=None) – Any matplotlib color

  • marker (str, default=None) – “None” (as a string, no marker shown), “” (empty string, no marker shown), or any matplotlib marker, e.g. any of os+v or others (see matplotlib documentation).

  • markerfacecolor (string, default=None) – see color

  • markersize (float, default=None) – Size of a marker. The scale may also depend on the backend. None uses the backend-specific default.

  • alpha (float, default=None) – Number between 0 and 1, setting the transparency.

  • label (str, default=None) – Label this dataset for use in a legend

  • linewidth (float, default=None) – Thickness of the line.

  • linecolor (str or tuple, default=None) – Any matplotlib color

  • xaxis (None)

  • ratioline (None)

  • ratioline – These parameters are deprecated and not used any longer.

  • xaxis – These parameters are deprecated and not used any longer.

select_plot(dataset, ids) [edit on github]

Select the plot window or figure for the given dataset.

The plot for this dataset is assumed to have been created.

Parameters:
  • dataset (str or int)

  • dataset. (The)

  • ids (array_like)

  • object. (The identifier array from the DataStack)

See also

initialize_plot

set_jointplot(row, col, nrows, ncols, create=True, top=0, ratio=2) [edit on github]

Move to the plot, creating them if necessary.

Parameters:
  • row (int) – The row number, starting from 0.

  • col (int) – The column number, starting from 0.

  • nrows (int) – The number of rows.

  • ncols (int) – The number of columns.

  • create (bool, optional) – If True then create the plots

  • top (int) – The row that is set to the ratio height, numbered from 0.

  • ratio (float) – The ratio of the height of row number top to the other rows.

set_subplot(row, col, nrows, ncols, clearaxes=True, left=None, right=None, bottom=None, top=None, wspace=0.3, hspace=0.4) [edit on github]

Select a plot space in a grid of plots or create new grid

This method adds a new subplot in a grid of plots.

Parameters:
  • row (int) – index (starting at 0) of a subplot in a grid of plots

  • col (int) – index (starting at 0) of a subplot in a grid of plots

  • nrows (int) – Number of rows and column in the plot grid

  • ncols (int) – Number of rows and column in the plot grid

  • clearaxes (bool) – If True, clear entire plotting area before adding the new subplot.

set_title(title: str) None [edit on github]

Change the display title.

Parameters:

title (str) – The title text to use.

setup_axes(overplot, clearwindow) [edit on github]

Return the axes object, creating it if necessary.

Parameters:
Returns:

The matplotlib axes object.

Return type:

axis

setup_plot(axes, title=None, xlabel=None, ylabel=None, xlog=False, ylog=False) [edit on github]

Basic plot setup.

Parameters:

axes – The plot axes (output of setup_axes).

vline(x, *, ymin=0, ymax=1, linecolor=None, linestyle=None, linewidth=None, overplot=False, clearwindow=True) [edit on github]

Draw a vertical line

Parameters:
  • x (float) – x position of the vertical line in data units

  • ymin (float, default=0) – Beginning of the vertical line in axes coordinates, i.e. from 0 (bottom) to 1 (top).

  • ymax (float, default=1) – End of the vertical line in axes coordinates, i.e. from 0 (bottom) to 1 (top).

  • linecolor (str or tuple, default=None) – Any matplotlib color

  • linestyle (str, default=None) – 'noline', 'None' (as string, same as 'noline'), 'solid', 'dot', 'dash', 'dashdot', '-' (solid line), ':' (dotted), '--' (dashed), '-.' (dashdot), '' (empty string, no line shown), None (default - usually solid line) or any other matplotlib linestyle.

  • linewidth (float, default=None) – Thickness of the line.

  • overplot (bool, default=False) – If True, the plot is added to an existing plot, if not a new plot is created.

  • clearwindow (bool, default=True) – If True the entire figure area is cleared to make space for a new plot.