diff --git a/HiLo.py b/HiLo.py index ff940181460..c31a7e19e59 100644 --- a/HiLo.py +++ b/HiLo.py @@ -7,13 +7,13 @@ def plot_maxmin_points(ax,lon, lat, data, extrema, nsize, symbol,color='k', outl outline_width=2.5, press_spacing=0.66,plotValue=True, transform=None): """ - ax argument allows for sending current axis to the HiLo plot - - Path effects on the symbols and pressure readings - outline them in black (default) with linewidth - 2.5 (default) to make them pop a bit more. The press_spacing (0.66 default) is based off latitude and helps + ax argument allows for sending current axis to the HiLo plot + + Path effects on the symbols and pressure readings - outline them in black (default) with linewidth + 2.5 (default) to make them pop a bit more. The press_spacing (0.66 default) is based off latitude and helps serarate the pressure reading and the symbol with the outline effects making them overlap. - - + + This function will find and plot relative maximum and minimum for a 2D grid. The function can be used to plot an H for maximum values (e.g., High pressure) and an L for minimum values (e.g., low pressue). It is best to used filetered data to obtain a synoptic scale @@ -41,9 +41,8 @@ def plot_maxmin_points(ax,lon, lat, data, extrema, nsize, symbol,color='k', outl data_ext = minimum_filter(data, nsize, mode='nearest') else: raise ValueError('Value for hilo must be either max or min') - + mxy, mxx = np.where(data_ext == data) - #print(mxy,mxx) for i in range(len(mxy)): A = ax.text(lon[mxy[i], mxx[i]], lat[mxy[i], mxx[i]], symbol, color=color, size=24, @@ -55,5 +54,3 @@ def plot_maxmin_points(ax,lon, lat, data, extrema, nsize, symbol,color='k', outl color=color, size=12, clip_on=True, fontweight='bold', horizontalalignment='center', verticalalignment='top', transform=transform) B.set_path_effects(outline_effect) - -