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 viaplot_function_table[Histogram] = plotintriqs.stat, sotriqs.plot.oplot(h)dispatches here for a Histogramh. Bin abscissae come fromHistogram.limitsandlen(h); ordinates fromHistogram.data(raw counts – passpdf(h)orcdf(h)to plot normalised distributions).Recognised keys in
optional_dictare 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.