# plot_trace¶

sherpa.astro.ui.plot_trace(points, name='x', xlabel='x', replot=False, overplot=False, clearwindow=True, **kwargs)

Create a trace plot of row number versus value.

Dispay a plot of the points array values (Y axis) versus row number (X axis). This can be useful to view how a value changes, such as the value of a parameter returned by get_draws.

Parameters
• points (array) – The values to plot on the Y axis.

• name (str, optional) – The label to use on the Y axis and as part of the plot title.

• xlabel (str, optional) –

• replot (bool, optional) – Set to True to use the values calculated by the last call to plot_trace. The default is False.

• overplot (bool, optional) – If True then add the data to an exsiting plot, otherwise create a new plot. The default is False.

• clearwindow (bool, optional) – Should the existing plot area be cleared before creating this new plot (e.g. for multi-panel plots)?

get_draws()

Run the pyBLoCXS MCMC algorithm.

get_trace_plot()

Return the data used to plot the last trace.

plot_cdf()

Plot the cumulative density function of an array.

plot_pdf()

Plot the probability density function of an array.

plot_scatter()

Create a scatter plot.

Examples

Plot the trace of the 500 elements in the x array:

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


Use “ampl” as the Y axis label:

>>> plot_trace(ampl, name='ampl')