PlotHistMST
- class PlotHistMST
A class for plotting the MST statistics.
- read_mst(mst_hist[, color=None, linewidth=2., linestyle=None, alpha=0.8, label=None, alpha_envelope=0.3])
Input MST statistics.
- Parameters:
mst_hist (dict) – Binned MST dictionary given in the format outputted by HistMST.
color (str) – Color of the MST histogram.
linewidth (float) – Width of the histogram line used.
linestyle (str) – Linestyle used.
alpha (float) – The transparency of the line.
label (str) – label used in the legend, this will only appear in the legend if this is given.
alpha_envelope (float) – The transparency of envelopes (usually the standard deviation of the counts in each bin).
- plot([usebox=True, saveas=None, fontsize=16, figsize=(16, 4), subplot_setup='4x1', units=None, showenvelopes=True, showsigma=2, usecomp=True, usemean=False, heigh_ratios=[2, 1], usefraction=True, whichcomp=0, plotzeroline=True, legend=True, subplot_adjust_top=0.85, legend_fontsize=14, legend_column=4, xlabels=[None, None, None, None], dpi=None, plt_output='show'])
Outputs the final plot of the MST statistics.
- Parameters:
usebox (bool) – For l, b and s this sets whether to use boxes for the histogram or to simple plot as line from the bin centre.
saveas (str) – If not None, this will save the plot with the name provided.
fontsize (int) – Fontsize of axis labels.
figsize (tuple) – Dimensions of the figure.
subplot_setup (str) – Subplot setup: ‘4x1’ or ‘2x2’.
units (str) – Units of l and b MST statistics, if None is supplied then we assume it is unitless.
showenvelopes (bool) – This determines whether to plot data with input standard deviation.
showsigma (int) – Number of sigma errorbars to plot.
usecomp (bool) – Determines whether to include comparison subplots.
usemean (bool) – For comparison plots, the determines whether to use the mean of input distributions.
height_ratios (tuple) – Height ratio between main plots and comparison plots.
usefraction (bool) – If true comparison plots are given by the fractional difference to a reference data otherwise they are given as absolute differences.
whichcomp (int) – Determines which data should be the reference data that all other data is compared to. Only used if usemean == False.
plotzeroline (bool) – Plots horizontal zero line for subplot.
legend (bool) – Determines whether to include a legend.
subplot_adjust_top (If legend == True then the figure's top is adjusted by the input value.) – float
legend_fontsize (int) – Size of legend text.
legend_column (int) – Number of keys in each line of the legend.
xlabels (list) – List of string labels to replace the default if not set to None.
dpi (int) – Pixels per inch for non-vector images.
plt_output (str) – output type: ‘closed’ or ‘show’
- clean()
Resets PlotHistMST variables.