Hello,
I am trying to change the size of the colorbar for a psi cross section using radar.display, and I am having troubles trying to do so. I would appreciate any type of help. I have tried to set it with plt.colorbar and fig.colorbar, and I have error messages.
This is the code:
xsect = pyart.util.cross_section_ppi(radar, [320])
display = pyart.graph.RadarDisplay(xsect)
fig= plt.figure(figsize=(30,30))
ax1 = fig.add_subplot(311)
display.plot('DBZH',0, cmap='pyart_Carbone42', vmin=-5, vmax=65, ax=ax1,colorbar_label= 'DBZH [dBZ]',title=" ")
ax1.set_ylim([0, 14])
ax1.set_xlim([60, 100])
ax1.set_xlabel('', fontsize=24)
ax1.set_ylabel('Distance above radar [km]', fontsize=24)
plt.xticks(fontsize=20)
plt.yticks(fontsize=20)
ax2 = fig.add_subplot(312)
display.plot('VELH',0, cmap='pyart_Carbone42', vmin=-30, vmax=30,ax=ax2,colorbar_label= 'VELH [m/s]',title=" ")
ax2.set_ylim([0, 14])
ax2.set_xlim([60, 100])
ax2.set_xlabel('', fontsize=24)
ax2.set_ylabel('Distance above radar [km]', fontsize=24)
plt.xticks(fontsize=20)
plt.yticks(fontsize=20)
ax3 = fig.add_subplot(313)
display.plot('ZDR', 0,cmap=mymap, vmin=-5, vmax=5,ax=ax3,colorbar_label= 'ZDR [dB]',title=" ")
ax3.set_ylim([0, 14])
ax3.set_xlim([60, 100])
ax3.set_xlabel('Distance from radar [km]', fontsize=24)
ax3.set_ylabel('Distance above radar [km]', fontsize=24)
plt.xticks(fontsize=20)
plt.yticks(fontsize=20)
#plt.colorbar(fig,shrink=1.5)
#plt.tight_layout()
plt.show()
Thanks in advance!
Anna