    Create a scatter plot.

plot_scatter(x, y, name='(x,y)', xlabel='x', ylabel='y', replot=False, overplot=False, clearwindow=True, **kwargs)
x - array
y - array
name - str, optional
xlabel - str, optional
ylabel - str, optional
replot - bool, optional
overplot - bool, optional
clearwindow - bool, optional

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')

PARAMETERS

The parameters for this function are:

Parameter
Definition
x
The values to plot on the X axis.
y
The values to plot on the Y axis. This must match the size of the x array.
name
The plot title.
xlabel
The label for the X axis.
ylabel
The label for the Y axis.
replot
Set to True to use the values calculated by the last call to `plot_scatter` . The default is False .
overplot
If True then add the data to an existing plot, otherwise create a new plot. The default is False .
clearwindow
Should the existing plot area be cleared before creating this new plot (e.g. for multi-panel plots)?

See the bugs pages on the Sherpa website for an up-to-date listing of known bugs.

December 2023