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.


------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to