pyrad.graph.plot_histogram2#

pyrad.graph.plot_histogram2(bin_centers, hist, fname_list, width=None, labelx='bins', labely='Number of Samples', titl='histogram', dpi=72, ax=None, fig=None, save_fig=True, color=None, alpha=None, invert_xaxis=False)[source]#

plots histogram

Parameters:
  • bin_centers (array) – histogram bin centers

  • hist (array) – values for each bin

  • fname_list (list of str) – list of names of the files where to store the plot

  • width (scalar or array-like) – the width(s) of the bars. If None it is going to be estimated from the distances between centers

  • labelx (str) – The label of the X axis

  • labely (str) – The label of the Y axis

  • titl (str) – The figure title

  • dpi (int) – dots per inch

  • fig (Figure) – Figure to add the colorbar to. If none a new figure will be created

  • ax (Axis) – Axis to plot on. if fig is None a new axis will be created

  • save_fig (bool) – if true save the figure. If false it does not close the plot and returns the handle to the figure

  • color (str) – color of the bars

  • alpha (float) – parameter controling the transparency

  • invert_xaxis (bool) – If true inverts the x axis

Returns:

fname_list or fig, ax (list of str) – list of names of the created plots