Skip to content

Commit 765793e

Browse files
committed
Update docstrings
1 parent e4ab602 commit 765793e

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

src/deepdiagnostics/plots/coverage_fraction.py

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,17 +126,26 @@ def plot(
126126
title="NPE"
127127
) -> tuple["fig", "ax"]:
128128
"""
129-
Args:
129+
Plot the coverage fraction and residuals if specified.
130+
131+
Args:
132+
data_display (Union[DataDisplay, str]): DataDisplay object or path to h5 file containing the data. If str, it will be loaded and requires the fields "coverage_fractions", "coverage_percentiles", and optionally "coverage_std".
130133
figure_alpha (float, optional): Opacity of parameter lines. Defaults to 1.0.
131134
line_width (int, optional): Width of parameter lines. Defaults to 3.
132-
legend_loc (str, optional): Location of the legend, str based on `matplotlib <https://matplotlib.org/stable/api/_as_gen/matplotlib.pyplot.legend.html>`_. Defaults to "lower right".
135+
legend_loc (str, optional): Location of the legend. Defaults to matplotlib specified.
136+
include_coverage_std (bool, optional): Whether to include the standard deviation shading for coverage fractions . Defaults to False.
137+
include_coverage_residual (bool, optional): Whether to include the residual plot (coverage fraction - diagonal). Creates an additional subplot under the original plot. Defaults to False.
138+
include_coverage_residual_std (bool, optional): Whether to include the standard deviation shading for residuals. Defaults to False.
139+
include_ideal_range (bool, optional): Whether to include the ideal range shading (0.1/0.2 around the diagonal). Defaults to True.
133140
reference_line_label (str, optional): Label name for the diagonal ideal line. Defaults to "Reference Line".
134141
reference_line_style (str, optional): Line style for the reference line. Defaults to "k--".
135142
x_label (str, optional): y label. Defaults to "Confidence Interval of the Posterior Volume".
136143
y_label (str, optional): y label. Defaults to "Fraction of Lenses within Posterior Volume".
144+
residual_y_label (str, optional): y label for the residual plot. Defaults to "Coverage Fraction Residual".
137145
title (str, optional): plot title. Defaults to "NPE".
146+
138147
"""
139-
148+
140149
if not isinstance(data_display, DataDisplay):
141150
data_display = DataDisplay().from_h5(data_display, self.plot_name)
142151

0 commit comments

Comments
 (0)