pyrad.graph.plot_scatter#
- pyrad.graph.plot_scatter(bin_edges1, bin_edges2, hist_2d, field_name1, field_name2, fname_list, prdcfg, metadata=None, lin_regr=None, lin_regr_slope1=None, rad1_name='RADAR001', rad2_name='RADAR002', titl='colocated radar gates', cmap=None, vmin=None, vmax=None, min_cnt=0, bins_transform='linear', marginals=True)[source]#
2D histogram (scatter density) plot with optional marginal distributions.
- Parameters:
bin_edges1, bin_edges2 (array-like) – Bin edges of each field (x and y dimensions).
hist_2d (ndarray (2D)) – The 2D histogram (counts per bin).
field_name1, field_name2 (str) – Names of each field (used for axis labeling).
fname_list (list of str) – List of filenames where the plot will be saved.
prdcfg (dict) – Product configuration dictionary. Must contain the key “ppiImageConfig” with entries “xsize”, “ysize”, and optionally “dpi”.
metadata (str, optional) – String with metadata to display in the plot (top-left corner).
lin_regr (tuple of float, optional) – Coefficients (slope, intercept) of a linear regression line to plot.
lin_regr_slope1 (float, optional) – Intercept of a regression line with slope fixed to 1.
rad1_name, rad2_name (str, optional) – Names of the radars providing the data.
titl (str, optional) – Plot title.
cmap (str or None, optional) – Name of the colormap. If None, the default Py-ART colormap for field_name1 will be used.
vmin, vmax (float, optional) – Minimum and maximum values for the axes limits.
min_cnt (int, optional) – Minimum number of counts displayed in the histogram.
bins_transform ({“linear”, “log”}, optional) – Scaling of the histogram colorbar. If “log”, a logarithmic scale is used. Default is “linear”.
marginals (bool, optional) – If True, marginal distributions (1D histograms) are plotted on the top and right side of the 2D histogram. Default is False.
- Returns:
fname_list (list of str) – List of filenames of the created plots.