Skip to content

Commit 84bdfcd

Browse files
Apply suggestions from code review Chahan
Co-authored-by: Chahan M. Kropf <[email protected]>
1 parent 3fa1380 commit 84bdfcd

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

climada/engine/impact.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1180,6 +1180,7 @@ def plot_rp_imp(
11801180
return_periods=(25, 50, 100, 250),
11811181
log10_scale=True,
11821182
axis=None,
1183+
kwargs_local_exceedance_impact={},
11831184
**kwargs,
11841185
):
11851186
"""
@@ -1204,7 +1205,10 @@ def plot_rp_imp(
12041205
axis : matplotlib.axes.Axes
12051206
imp_stats : np.array
12061207
return_periods.size x num_centroids
1207-
1208+
See Also
1209+
--------
1210+
engine.impact.local_exceedance_impact :
1211+
inter- and extrapolation method
12081212
Notes
12091213
-----
12101214
For handling large data, and for more flexible options in the exceedance
@@ -1221,6 +1225,7 @@ def plot_rp_imp(
12211225

12221226
impacts_stats, title, column_labels = self.local_exceedance_impact(
12231227
return_periods
1228+
**kwargs_local_exceedance_impact
12241229
)
12251230

12261231
impacts_stats_vals = impacts_stats.values[:, 1:].T.astype(float)

climada/hazard/plot.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ def plot_rp_intensity(
4141
self,
4242
return_periods=(25, 50, 100, 250),
4343
axis=None,
44+
kwargs_local_exceedance_intensity={},
4445
**kwargs,
4546
):
4647
"""
@@ -54,13 +55,18 @@ def plot_rp_intensity(
5455
return periods to consider
5556
axis: matplotlib.axes._subplots.AxesSubplot, optional
5657
axis to use
58+
kwargs_local_exceedance_intensity: dict
59+
Dictionary of keyword arguments for the method hazard.local_exceedance_intensity
5760
kwargs: optional
5861
arguments for pcolormesh matplotlib function used in event plots
5962
6063
Returns
6164
-------
6265
axis, inten_stats: matplotlib.axes._subplots.AxesSubplot, np.ndarray
6366
intenstats is return_periods.size x num_centroids
67+
See Also
68+
---------
69+
hazard.local_exceedance_intensity: method to calculate local exceedance frequencies.
6470
6571
Notes
6672
-----
@@ -76,7 +82,7 @@ def plot_rp_intensity(
7682
)
7783

7884
inten_stats, title, column_labels = self.local_exceedance_intensity(
79-
return_periods
85+
return_periods, **kwargs_local_exceedance_intensity
8086
)
8187

8288
axis = u_plot.plot_from_gdf(

0 commit comments

Comments
 (0)