pyrad.graph.plot_bias_over_range#
- pyrad.graph.plot_bias_over_range(range_centers, meanbias, percentile_dict, fname_list, nsamples=None, reference_label='rad2 - rad1', field_name='field', titl=None, labelx='Range to radar 1 (m)', labely=None, mean_label='mean bias', range_marker=None, ref_value=0.0, plot_npoints=True, bias_vmin=None, bias_vmax=None, figsize=(12, 7), dpi=72, percentile_style='band')[source]#
Plot intercomparison bias over range.
Percentiles can be displayed either as discrete lines or as shaded percentile envelopes. The default style, “band”, is recommended for readability because it highlights the median and the percentile spread without overloading the figure.
- Parameters:
range_centers (array-like) – Range bin centers in meters.
meanbias (array-like) – Mean bias per range bin.
percentile_dict (dict) – Dictionary mapping percentile value to percentile bias array. Example:
- {
5: quant05_vec, 25: quant25_vec, 50: median_vec, 75: quant75_vec, 95: quant95_vec,
}
fname_list (list of str) – Output figure filenames.
nsamples (array-like, optional) – Number of samples per range bin.
reference_label (str) – Bias label, e.g. “310CHX - 144CHX”.
field_name (str) – Name of plotted field.
titl (str, optional) – Plot title.
labelx (str) – x-axis label.
labely (str, optional) – y-axis label. If None, generated from reference_label.
mean_label (str) – Legend label for the mean bias curve.
range_marker (float, optional) – Vertical range marker in meters.
ref_value (float) – Horizontal reference line value.
plot_npoints (bool) – If True and nsamples is not None, plot sample count on secondary axis.
bias_vmin, bias_vmax (float, optional) – y-axis limits.
figsize (tuple) – Figure size.
dpi (int) – Figure resolution.
percentile_style (str) –
- How to display percentiles. Accepted values are:
- “band”:
Display percentile ranges as shaded envelopes. If available, 5-95 and 25-75 bands are plotted, and the 50th percentile is shown as a discrete median line.
- “lines”:
Display all percentiles as thin, color-sorted lines.
Default: “band”.
- Returns:
fname_list (list of str) – List of saved figure filenames.