@@ -226,12 +226,20 @@ def _exp_impact(self, exp_iimp, exposures, hazard, imp_fun, insure_flag):
226226 self .at_event += np .squeeze (np .asarray (np .sum (impact , axis = 1 )))
227227 self .tot_value += np .sum (exposures .value [exp_iimp ])
228228
229- def plot_eai_exposure (self , ignore_zero = True , var_name = None , ** kwargs ):
229+ def plot_eai_exposure (self , ignore_zero = True , pop_name = True ,
230+ buffer_deg = 0.0 , extend = 'neither' , var_name = None ,
231+ ** kwargs ):
230232 """Plot expected annual impact of each exposure.
231233
232234 Parameters:
233- ignore_zero (bool, optional): ignore zero impact values
234- var_name (str, optional): name in colorbar
235+ ignore_zero (bool, optional): flag to indicate if zero and negative
236+ values are ignored in plot. Default: False
237+ pop_name (bool, optional): add names of the populated places
238+ buffer_deg (float, optional): border to add to coordinates.
239+ Default: 1.0.
240+ extend (str, optional): extend border colorbar with arrows.
241+ [ 'neither' | 'both' | 'min' | 'max' ]
242+ var_name (str, optional): Colorbar label
235243 kwargs (optional): arguments for hexbin matplotlib function
236244
237245 Returns:
@@ -247,4 +255,5 @@ def plot_eai_exposure(self, ignore_zero=True, var_name=None, **kwargs):
247255 if 'reduce_C_function' not in kwargs :
248256 kwargs ['reduce_C_function' ] = np .sum
249257 return plot .geo_bin_from_array (self .eai_exp [pos_vals ], \
250- self .coord_exp [pos_vals ], var_name , title , ** kwargs )
258+ self .coord_exp [pos_vals ], var_name , title , pop_name , buffer_deg , \
259+ extend , ** kwargs )
0 commit comments