Skip to content

Commit 672051b

Browse files
adapted docstrings of plot_rp_.. funcs
1 parent 2ee82ff commit 672051b

File tree

2 files changed

+18
-8
lines changed

2 files changed

+18
-8
lines changed

climada/engine/impact.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1140,11 +1140,9 @@ def plot_rp_imp(
11401140
**kwargs,
11411141
):
11421142
"""
1143-
This function is deprecated, use Impact.local_exceedance_impact and
1144-
util.plot.plot_from_gdf instead.
1145-
11461143
Compute and plot exceedance impact maps for different return periods.
1147-
Calls local_exceedance_imp.
1144+
Calls local_exceedance_impact. For handling large data sets and for further options,
1145+
see Notes.
11481146
11491147
Parameters
11501148
----------
@@ -1163,6 +1161,13 @@ def plot_rp_imp(
11631161
axis : matplotlib.axes.Axes
11641162
imp_stats : np.array
11651163
return_periods.size x num_centroids
1164+
1165+
Notes
1166+
-----
1167+
For handling large data, and for more flexible options in the exceedance
1168+
impact computation and in the plotting, we recommend to use
1169+
gdf, title, labels = impact.local_exceedance_impact() and
1170+
util.plot.plot_from_gdf(gdf, title, labels) instead.
11661171
"""
11671172

11681173
LOGGER.info(

climada/hazard/plot.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,9 @@ def plot_rp_intensity(
4444
**kwargs,
4545
):
4646
"""
47-
This function is deprecated,
48-
use Impact.local_exceedance_impact and util.plot.plot_from_gdf instead.
49-
5047
Compute and plot hazard exceedance intensity maps for different
51-
return periods. Calls local_exceedance_inten.
48+
return periods. Calls local_exceedance_intensity. For handling large data sets and for
49+
further options, see Notes.
5250
5351
Parameters
5452
----------
@@ -63,6 +61,13 @@ def plot_rp_intensity(
6361
-------
6462
axis, inten_stats: matplotlib.axes._subplots.AxesSubplot, np.ndarray
6563
intenstats is return_periods.size x num_centroids
64+
65+
Notes
66+
-----
67+
For handling large data, and for more fleixble options in the exceedance
68+
intensity computation and in the plotting, we recommend to use
69+
gdf, title, labels = hazard.local_exceedance_intensity() and
70+
util.plot.plot_from_gdf(gdf, title, labels) instead.
6671
"""
6772
LOGGER.info(
6873
"Some errors in the previous calculation of local exceedance intensities have been corrected,"

0 commit comments

Comments
 (0)