Same color bar range for different plots - Matplotlib
问题 I'm struggling to keep the same color bar range through different plots. For example, I have these visualizations: Which are produced with this code: def plot_contour(x_dim, y_dim, x_steps, y_steps, scalar_field, file_path): plt.figure() x, y = numpy.mgrid[-x_dim:x_dim/:x_steps*1j, -y_dim:y_dim:y_steps*1j] cs = plt.contourf(x, y, scalar_field, zorder=1, extent=[-x_dim, x_dim, -y_dim, y_dim]) plt.colorbar(cs) plt.savefig(file_path + '.png', dpi=Vc.dpi) plt.close() I want to be able to compare