|
4 | 4 |
|
5 | 5 | def make_annual_hs_boxplot(stn: str, year: int) -> Figure: |
6 | 6 | """ |
7 | | - Create a boxplot of annual significant wave heights for a station. |
8 | | -
|
9 | | - Args: |
10 | | - stn (str): A 5-char station identifier, e.g. '100p1'. |
11 | | - year (int): The year to plot. |
12 | | -
|
13 | | - Returns: |
14 | | - fig (Figure): A matplotlib.pyplot.Figure object for the created plot. |
| 7 | + Create a boxplot of annual significant wave heights for a given station and year. |
| 8 | +
|
| 9 | + Parameters |
| 10 | + ---------- |
| 11 | + stn : str |
| 12 | + A 5-character station identifier, e.g., '100p1'. |
| 13 | + year : int |
| 14 | + The year for which the boxplot is generated. |
| 15 | +
|
| 16 | + Returns |
| 17 | + ------- |
| 18 | + fig : Figure |
| 19 | + A matplotlib Figure object representing the annual wave height boxplot. |
| 20 | +
|
| 21 | + Example |
| 22 | + ------- |
| 23 | + >>> fig = make_annual_hs_boxplot('100p1', 2023) |
| 24 | + >>> fig.show() |
15 | 25 | """ |
16 | | - |
17 | 26 | return plots.annual_hs_boxplot.make_plot(stn, year) |
18 | 27 |
|
19 | 28 |
|
20 | 29 | def make_compendium_plot( |
21 | 30 | stns: str, start: str, end: str, params: str, x_inch: int |
22 | 31 | ) -> Figure: |
23 | | - """CDIP's classic compendium plot for multiple stations and parameters. |
24 | | -
|
25 | | - Args: |
26 | | - stns (str): A comma-delimited list of 5-char station identifiers, e.g. '100p1,201p1'. |
27 | | - start (str): Start time of data series formatted as 'yyyymm[ddHHMMss]' where 'ddHHMMss' are optional components. |
28 | | - end (str): End time of data series ('yyyymm[ddHHMMss]') If 'None' is provided, defaults to the current date and time. |
29 | | - params (str): A comma-delimited string of parameter names, e.g. 'waveHs,waveTp'. |
30 | | -
|
31 | | - Returns: |
32 | | - fig (Figure): A matplotlib.pyplot.Figure object for the created plot. |
33 | | -
|
34 | 32 | """ |
35 | | - |
| 33 | + Generate CDIP's classic compendium plot for multiple stations and parameters over a time range. |
| 34 | +
|
| 35 | + Parameters |
| 36 | + ---------- |
| 37 | + stns : str |
| 38 | + Comma-delimited list of 5-character station identifiers, e.g., '100p1,201p1'. |
| 39 | + start : str |
| 40 | + Start time formatted as 'yyyymm[ddHHMMss]'; optional components default to zero. |
| 41 | + end : str |
| 42 | + End time formatted as 'yyyymm[ddHHMMss]'. If None, defaults to current date/time. |
| 43 | + params : str |
| 44 | + Comma-delimited string of parameter names, e.g., 'waveHs,waveTp'. |
| 45 | + x_inch : int |
| 46 | + Width of the figure in inches. |
| 47 | +
|
| 48 | + Returns |
| 49 | + ------- |
| 50 | + fig : Figure |
| 51 | + A matplotlib Figure object representing the compendium plot. |
| 52 | +
|
| 53 | + Example |
| 54 | + ------- |
| 55 | + >>> fig = make_compendium_plot('100p1,201p1', '202301', '202312', 'waveHs,waveTp', 10) |
| 56 | + >>> fig.show() |
| 57 | + """ |
36 | 58 | return plots.compendium.make_plot(stns, start, end, params, x_inch) |
37 | 59 |
|
38 | 60 |
|
39 | 61 | def make_sst_climatology_plot( |
40 | 62 | stn: str, x_inch: int = None, y_inch: int = None |
41 | 63 | ) -> Figure: |
42 | 64 | """ |
43 | | - Create a plot of yearly climatology of sea surface temperature at a station for all years of available data. |
44 | | -
|
45 | | - Args: |
46 | | - stn (str): A 5-char station identifier, e.g. '100p1'. |
47 | | -
|
48 | | - Returns: |
49 | | - fig (Figure): A matplotlib.pyplot.Figure object for the created plot. |
| 65 | + Plot the yearly climatology of sea surface temperature for a given station over all available years. |
| 66 | +
|
| 67 | + Parameters |
| 68 | + ---------- |
| 69 | + stn : str |
| 70 | + A 5-character station identifier, e.g., '100p1'. |
| 71 | + x_inch : int, optional |
| 72 | + Width of the figure in inches. Default is None. |
| 73 | + y_inch : int, optional |
| 74 | + Height of the figure in inches. Default is None. |
| 75 | +
|
| 76 | + Returns |
| 77 | + ------- |
| 78 | + fig : Figure |
| 79 | + A matplotlib Figure object representing the SST climatology plot. |
| 80 | +
|
| 81 | + Example |
| 82 | + ------- |
| 83 | + >>> fig = make_sst_climatology_plot('100p1', x_inch=8, y_inch=6) |
| 84 | + >>> fig.show() |
50 | 85 | """ |
51 | | - |
52 | 86 | return plots.sst_climatology.make_plot(stn, x_inch, y_inch) |
0 commit comments