plot_scatter

sherpa.ui.plot_scatter(x: ArrayType, y: ArrayType, name: str = '(x,y)', xlabel: str = 'x', ylabel: str = 'y', replot: bool = False, overplot: bool = False, clearwindow: bool = True, **kwargs) None

Create a scatter plot.

Parameters:
xarray

The values to plot on the X axis.

yarray

The values to plot on the Y axis. This must match the size of the x array.

namestr, optional

The plot title.

xlabelstr, optional

The label for the X axis.

ylabelstr, optional

The label for the Y axis.

replotbool, optional

Set to True to use the values calculated by the last call to plot_scatter. The default is False.

overplotbool, optional

If True then add the data to an existing plot, otherwise create a new plot. The default is False.

clearwindowbool, optional

Should the existing plot area be cleared before creating this new plot (e.g. for multi-panel plots)?

See also

get_scatter_plot

Return the data used to plot the last scatter plot.

plot_trace

Create a trace plot of row number versus value.

Examples

Plot the X and Y points:

>>> mu, sigma, n = 100, 15, 500
>>> x = mu + sigma * np.random.randn(n)
>>> y = mu + sigma * np.random.randn(n)
>>> plot_scatter(x, y)

Change the axis labels and the plot title:

>>> plot_scatter(nh, kt, xlabel='nH', ylabel='kT', name='Simulations')