diff --git a/cdippy/plotting.py b/cdippy/plotting.py index f0c893a..20a016c 100644 --- a/cdippy/plotting.py +++ b/cdippy/plotting.py @@ -4,35 +4,34 @@ def make_annual_hs_boxplot(stn: str, year: int) -> Figure: """ - Create a boxplot of annual significant wave heights for a station. + Create a boxplot of annual significant wave heights for a given station and year. Args: - stn (str): A 5-char station identifier, e.g. '100p1'. - year (int): The year to plot. + stn (str): A 5-character station identifier, e.g., '100p1'. + year (int): The year for which the boxplot is generated. Returns: - fig (Figure): A matplotlib.pyplot.Figure object for the created plot. + Figure: A matplotlib Figure object representing the annual wave height boxplot. """ - return plots.annual_hs_boxplot.make_plot(stn, year) def make_compendium_plot( stns: str, start: str, end: str, params: str, x_inch: int ) -> Figure: - """CDIP's classic compendium plot for multiple stations and parameters. + """ + Generate CDIP's compendium plot for multiple stations and parameters over a time range. Args: - stns (str): A comma-delimited list of 5-char station identifiers, e.g. '100p1,201p1'. - start (str): Start time of data series formatted as 'yyyymm[ddHHMMss]' where 'ddHHMMss' are optional components. - end (str): End time of data series ('yyyymm[ddHHMMss]') If 'None' is provided, defaults to the current date and time. - params (str): A comma-delimited string of parameter names, e.g. 'waveHs,waveTp'. + stns (str): Comma-delimited list of 5-character station identifiers, e.g., '100p1,201p1'. + start (str): Start time formatted as 'yyyymm[ddHHMMss]'; optional components default to zero. + end (str): End time formatted as 'yyyymm[ddHHMMss]'. If None, defaults to current date/time. + params (str): Comma-delimited string of parameter names, e.g., 'waveHs,waveTp'. + x_inch (int): Width of the figure in inches. Returns: - fig (Figure): A matplotlib.pyplot.Figure object for the created plot. - + Figure: A matplotlib Figure object representing the compendium plot. """ - return plots.compendium.make_plot(stns, start, end, params, x_inch) @@ -40,13 +39,14 @@ def make_sst_climatology_plot( stn: str, x_inch: int = None, y_inch: int = None ) -> Figure: """ - Create a plot of yearly climatology of sea surface temperature at a station for all years of available data. + Plot the yearly climatology of sea surface temperature for a given station over all available years. Args: - stn (str): A 5-char station identifier, e.g. '100p1'. + stn (str): A 5-character station identifier, e.g., '100p1'. + x_inch (int, optional): Width of the figure in inches. Defaults to None. + y_inch (int, optional): Height of the figure in inches. Defaults to None. Returns: - fig (Figure): A matplotlib.pyplot.Figure object for the created plot. + Figure: A matplotlib Figure object representing the SST climatology plot. """ - return plots.sst_climatology.make_plot(stn, x_inch, y_inch)