triqs.stat.histogram.plot

triqs.stat.histogram.plot(self, optional_dict)[source]

Plot protocol for Histogram objects.

Builds the keyword-argument dictionary consumed by triqs.plot.protocol.plot_protocol_apply(). Registered via plot_function_table[Histogram] = plot in triqs.stat, so triqs.plot.oplot(h) dispatches here for a Histogram h. Bin abscissae come from Histogram.limits and len(h); ordinates from Histogram.data (raw counts – pass pdf(h) or cdf(h) to plot normalised distributions).

Recognised keys in optional_dict are listed below; any additional keys are forwarded unchanged to the matplotlib call.

Parameters:
typestr, optional

Drawing mode for the histogram. 'XY' (default) plots bin centres as a line; 'bar' draws bars centred on the bin centres.

widthfloat, optional

Bar width used when type='bar'. Defaults to the bin spacing (b - a) / (n_bins - 1).

Returns:
plot_datalist of dict

Single-element list whose dictionary holds the keyword arguments forwarded by triqs.plot.oplot: xdata, ydata, label, plot_function, and (in bar mode) width.