graphorge.ioput.plots.plot_histogram_2d

plot_histogram_2d(data, bins=10, bins_range=None, density=False, x_lims=(None, None), y_lims=(None, None), title=None, x_label=None, y_label=None, x_scale='linear', y_scale='linear', x_tick_format=None, y_tick_format=None, is_latex=False)[source]

Plot 2D histogram.

Parameters:
  • data (numpy.ndarray(2d)) – Histogram data set provided as a numpy.ndarray(2d) of shape (n_points, 2).

  • bins ({int, [int, int]}, default=10) – Histogram bins for each dimension.

  • bins_range (np.ndarray(2d), default=None) – The lower and upper range of the bins along each dimension, ignoring outliers outside the provided range. The bounds for the i-th dimension are stored as [min, max] in bins_range[i, :].

  • density (bool, default=False) – If True, draw and return a probability density (area under the histogram integrates to 1).

  • title (str, default=None) – Plot title.

  • x_label (str, default=None) – x-axis label.

  • y_label (str, default=None) – y-axis label.

  • x_scale (str {'linear', 'log'}, default='linear') – x-axis scale. If None or invalid format, then default scale is set. Scale ‘log’ overrides any x-axis ticks formatting.

  • y_scale (str {'linear', 'log'}, default='linear') – y-axis scale. If None or invalid format, then default scale is set. Scale ‘log’ overrides any y-axis ticks formatting.

  • x_tick_format ({'int', 'float', 'exp'}, default=None) – x-axis ticks formatting. If None or invalid format, then default formatting is set.

  • y_tick_format ({'int', 'float', 'exp'}, default=None) – y-axis ticks formatting. If None or invalid format, then default formatting is set.

  • is_latex (bool, default=False) – If True, then render all strings in LaTeX. If LaTex is not available, then this option is silently set to False and all input strings are processed to remove $(…)$ enclosure.

Returns:

  • figure (Matplotlib Figure) – Figure.

  • axes (Matplotlib Axes) – Axes.