xdem.spatialstats.plot_2d_binning

xdem.spatialstats.plot_2d_binning#

xdem.spatialstats.plot_2d_binning(df, var_name_1, var_name_2, statistic_name, label_var_name_1=None, label_var_name_2=None, label_statistic=None, cmap=<matplotlib.colors.LinearSegmentedColormap object>, min_count=30, scale_var_1='linear', scale_var_2='linear', vmin=None, vmax=None, nodata_color='yellow', ax=None, out_fname=None)[source]#

Plot one statistic and its count along two binning variables. Input is expected to be formatted as the output of the xdem.spatialstats.nd_binning function.

Parameters:
  • df (DataFrame) – Output dataframe of nd_binning

  • var_name_1 (str) – Name of first binning variable to plot

  • var_name_2 (str) – Name of second binning variable to plot

  • statistic_name (str) – Name of statistic of interest to plot

  • label_var_name_1 (str | None) – Label of first binning variable

  • label_var_name_2 (str | None) – Label of second binning variable

  • label_statistic (str | None) – Label of statistic of interest

  • cmap (Colormap) – Colormap

  • min_count (int) – Removes statistic values computed with a count inferior to this minimum value

  • scale_var_1 (str) – Scale along the axis of the first variable

  • scale_var_2 (str) – Scale along the axis of the second variable

  • vmin (floating[Any]) – Minimum statistic value in colormap range

  • vmax (floating[Any]) – Maximum statistic value in colormap range

  • nodata_color (str | tuple[float, float, float, float]) – Color for no data bins

  • ax (Axes | None) – Plotting ax to use, creates a new one by default

  • out_fname (str) – File to save the variogram plot to

Return type:

None