Hi all!
following code shows the problem I have with placing a colorbar for several
subplots.
#-----------------------------code------------
import matplotlib
import numpy as np
import matplotlib.cm as cm
import matplotlib.mlab as mlab
import matplotlib.pyplot as plt
matplotlib.rcParams['xtick.direction'] = 'out'
matplotlib.rcParams['ytick.direction'] = 'out'
delta = 0.025
x = np.arange(-3.0, 3.0, delta)
y = np.arange(-2.0, 2.0, delta)
X, Y = np.meshgrid(x, y)
Z1 = mlab.bivariate_normal(X, Y, 1.0, 1.0, 0.0, 0.0)
Z2 = mlab.bivariate_normal(X, Y, 1.5, 0.5, 1, 1)
# difference of Gaussians
Z = 10.0 * (Z2 - Z1)
plt.figure()
plt.subplot(211)
CS = plt.contourf(X, Y, Z)
plt.subplot(212)
CS = plt.contourf(X, Y, Z)
plt.colorbar(orientation='horizontal')
plt.show()
#-------------end code--------------
result:
http://old.nabble.com/file/p32037832/inttest.png
is ther a way to not let the colorbar cut space from the 2nd subplot. I
would like to have them both the same size.
Thanks!
Siggi
···
--
View this message in context: http://old.nabble.com/Decouple-the-colorbar-form-subplot-tp32037832p32037832.html
Sent from the matplotlib - users mailing list archive at Nabble.com.