I am trying to plot a single colorbar (range : 0, max), for all the sublots that I have. I have tried the solutions here Matplotlib 2 Subplots, 1 Colorbar but they require using plt.subplots, which I am not using.
Here is my current code which displays 3 individual colorbars.
fig = plt.figure(figsize=(15,15))
G = gridspec.GridSpec(2, 2)
#Haut
top = plt.subplot(G[0,0], projection='polar')
phi2D_grid, rho2D_grid = np.meshgrid(phi_grid, rho_grid)
plt.pcolormesh(phi2D_grid, rho2D_grid, compteur_top, cmap='jet', vmin=0, vmax=max)
plt.colorbar()
#Côtés
lat = plt.subplot(G[1,:])
phi2D_grid, z2D_grid = np.meshgrid(phi_grid, z_grid)
plt.pcolormesh(phi2D_grid, z2D_grid, compteur_lat, cmap='jet', vmin=0, vmax=max)
plt.colorbar()
#Bas
bot = plt.subplot(G[0, 1], projection='polar')
phi2D_grid, rho2D_grid = np.meshgrid(phi_grid, rho_grid)
plt.pcolormesh(phi2D_grid, rho2D_grid, compteur_bot, cmap='jet', vmin=0, vmax=max)
plt.colorbar()
I think I do need to use Gridspec here given that I need to display my figures as follow: