projection = ccrs.PlateCarree(central_longitude=180.0) levels = np.arange(0, 1.6, 0.1) resolution = "110m" # Create figure and axes fig, axes = plt.subplots(4, 2, figsize=(16, 12), subplot_kw={"projection": projection}) ax1, ax2, ax3, ax4, ax5, ax6, ax7, ax8 = axes.flatten() ############## Subplot 1 ################# cart.set_subplots(ax1, projection, resolution, lon_min=-180, lon_max=179, lat_min=-66, lat_max=66) cs1 = ax1.pcolormesh( lon, lat, a_phase_i_m, vmin=-np.pi, vmax=np.pi, cmap=cmo.phase, transform=ccrs.PlateCarree(central_longitude=0.0), ) cart.set_grid_ticks( ax1, projection=ccrs.PlateCarree(),
xlim = [0, 13] ylim = [[-1, 4], [5, 10]] levels = np.arange(2, 8.1, 0.1) resolution = "10m" # initialize subplot axes: fig = plt.figure(figsize=(22, 28)) ############## Subplot 1 ############## # Western Australia ax1 = fig.add_subplot(421, projection=ccrs.PlateCarree(central_longitude=180.0)) cart.set_subplots(ax1, projection, resolution, lon_min=-81, lon_max=-59, lat_min=-35, lat_max=-20) cs1 = ax1.contourf( lon_w, lat_w, wsp_moments_mean[0, :, :], levels, cmap=cmo.thermal, extend="both", transform=ccrs.PlateCarree(central_longitude=0.0), ) cart.grid_lines_rc( ax1, xticks=[100, 104, 108, 112, 116, 120],
cmaplist = [cmap(i) for i in range(cmap.N)] # create the new map cmap = matplotlib.colors.LinearSegmentedColormap.from_list( "Custom cmap", cmaplist, cmap.N) # define the bins and normalize bounds = np.linspace(-np.pi, np.pi, 13) norm = matplotlib.colors.BoundaryNorm(bounds, cmap.N) ######## Suplot 1 ######## cart.set_subplots( axes, projection, resolution, lon_min=-180, lon_max=179, lat_min=-66, lat_max=66, ) cs1 = axes.pcolor( lon, lat, phase_diff, vmin=-np.pi, vmax=np.pi, cmap=cmap, transform=ccrs.PlateCarree(central_longitude=0.0), ) cart.set_grid_ticks( axes,
# Adjust prob_swell and longitude for plotting. prob_swell, lon_ps = add_cyclic_point(prob_swell, coord=lon_ps) # Initialize variables for plotting projection = ccrs.PlateCarree(central_longitude=180.0) xticks = [160, 180, -160, -140] yticks = [-20, -10, 0, 10] resolution = "10m" # Create figure and axes fig, axes = plt.subplots(2, 1, figsize=(16, 12), subplot_kw={"projection": projection}) ax1, ax2 = axes.flatten() ############## Subplot 1 ################# cart.set_subplots( ax1, projection, resolution, lon_min=-30, lon_max=50, lat_min=-25, lat_max=11 ) cs1 = ax1.pcolormesh( lon_i, lat_i, a_phase_m, vmin=-np.pi, vmax=np.pi, cmap=cmo.phase, transform=ccrs.PlateCarree(central_longitude=0.0), ) cart.set_grid_ticks( ax1, projection=ccrs.PlateCarree(), xticks=xticks, yticks=yticks,
] xlim = [0, 13] ylim = [[-1, 4], [3, 10]] resolution = "10m" # initialize subplot axes: fig = plt.figure(figsize=(22, 28)) ############## Subplot 1 ################# # Central South Atlantic ax1 = fig.add_subplot(621, projection=ccrs.PlateCarree(central_longitude=180.0)) cart.set_subplots(ax1, projection, resolution, lon_min=154, lon_max=179, lat_min=-12, lat_max=0) cs1 = ax1.pcolormesh( lon_reg_saw, lat_reg_saw, s_atlantic_w_m, vmin=-np.pi, vmax=np.pi, cmap=cmo.phase, transform=ccrs.PlateCarree(central_longitude=0.0), ) cart.grid_lines_rc( ax1, xticks=[-26, -22, -18, -14, -10, -6, -2],