Re: [Matplotlib-users] Is there a way to link axes of imshow plots?

2010-06-01 Thread Adam Fraser
Hi all, I updated to version 99.1.1 and I'm still getting the error ValueError: argument must be box, or datalim at set_adjustable... from axes.py when I try to do ax.set_adjustable(box-forced) as you suggested. -Adam On Thu, May 27, 2010 at 3:08 PM, Adam Fraser

Re: [Matplotlib-users] Is there a way to link axes of imshow plots?

2010-06-01 Thread Jae-Joon Lee
As Eric told, you need to build it from the svn. Unfortunately, no released version (I believe) includes this feature. http://matplotlib.sourceforge.net/faq/installing_faq.html#install-from-svn Anyhow, the patch for box-forced involves only a few lines of change. You may consider to apply it by

[Matplotlib-users] Is there a way to link axes of imshow plots?

2010-05-27 Thread Adam Fraser
Suppose I have a figure canvas with 3 plots... 2 are images of the same dimensions plotted with imshow, and the other is a scatterplot. I'd like to be able to link the x and y axes of the imshow plots so that when I zoom in one, the other zooms to the same coordinates, and when I pan in one, the

Re: [Matplotlib-users] Is there a way to link axes of imshow plots?

2010-05-27 Thread PHobson
Do the sharex and sharey kwargs help? http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.axes http://matplotlib.sourceforge.net/examples/pylab_examples/shared_axis_demo.html -paul From: Adam Fraser [mailto:adam.n.fra...@gmail.com] Sent: Thursday, May 27, 2010 10:44 AM To:

Re: [Matplotlib-users] Is there a way to link axes of imshow plots?

2010-05-27 Thread Jae-Joon Lee
ax1 = subplot(121) ax2 = subplot(122, sharex=ax1, sharey=ax1) ax1.set_adjustable(box-forced) ax2.set_adjustable(box-forced) arr1 = np.arange(100).reshape((10, 10)) ax1.imshow(arr1) arr2 = np.arange(100, 0, -1).reshape((10, 10)) ax2.imshow(arr2) Note the use of set_adjustable(box-forced).

Re: [Matplotlib-users] Is there a way to link axes of imshow plots?

2010-05-27 Thread Adam Fraser
Thanks very much, I'm getting ValueError: argument must be box, or datalim at set_adjustable... I'm using Matplotlib version 0.98.5.3, do I need to update? On Thu, May 27, 2010 at 2:59 PM, Jae-Joon Lee lee.j.j...@gmail.com wrote: ax1 = subplot(121) ax2 = subplot(122, sharex=ax1, sharey=ax1)

Re: [Matplotlib-users] Is there a way to link axes of imshow plots?

2010-05-27 Thread Eric Firing
On 05/27/2010 09:08 AM, Adam Fraser wrote: Thanks very much, I'm getting ValueError: argument must be box, or datalim at set_adjustable... I'm using Matplotlib version 0.98.5.3, do I need to update? Yes. Unfortunately, you will need to build from svn. JJ added box-forced in January, and