Re: [Matplotlib-users] aligning plot width with imshow/contour width

2014-11-20 Thread Ken Mankoff
I'm using mpl 1.4.2. I posted this question onto StackOverflow and got a nice reply/tutorial. https://stackoverflow.com/questions/26985210/ Thanks, -k. -- Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Serv

Re: [Matplotlib-users] aligning plot width with imshow/contour width

2014-11-19 Thread zhangtao
I use matolotlib 1.3.1 on windows, the code works fine here. what version of matolotlib are you using? Or, set space to 0, see what happens. -- View this message in context: http://matplotlib.1069221.n5.nabble.com/aligning-pl

Re: [Matplotlib-users] aligning plot width with imshow/contour width

2014-11-19 Thread Ken Mankoff
Hi Zhangtao, When I run that code I do not see the 2nd subplot. If I add "fig.canvas.draw()" to the bottom, it appears, but it is not the same width as the upper subplot. On Tue, Nov 18, 2014 at 10:15 AM, zhangtao wrote: > from matplotlib.pylab import * > fig = plt.figure(1) > fig.clf() > data

Re: [Matplotlib-users] aligning plot width with imshow/contour width

2014-11-18 Thread zhangtao
from matplotlib.pylab import * fig = plt.figure(1) fig.clf() data = np.random.random((3,3)) xaxis = np.arange(0,3) yaxis = np.arange(0,3) ax1 = fig.add_subplot(211) im = ax1.imshow(data, interpolation='none') c = ax1.contour(xaxis, yaxis, data, colors='k') # # draw ax1 first