Re: [Matplotlib-users] Enforcing common view limits

2009-05-02 Thread Thomas Robitaille
I've realized that using the ParasiteAxes from the mpl_toolkits should do exactly what I'm asking. However, I am having a problem with callbacks when the x and y limits change (try resizing the window). The following script shows that the callback for the second set of axes is not carried out. Is

Re: [Matplotlib-users] Enforcing common view limits

2009-05-02 Thread Thomas Robitaille
There was a typo in the script, the callbacks should be ax.name = first axis ax.callbacks.connect('xlim_changed',check_callback) ax.callbacks.connect('ylim_changed',check_callback) ax2 = ax.twin() ax2.name = second axis ax2.callbacks.connect('xlim_changed',check_callback)

Re: [Matplotlib-users] Enforcing common view limits

2009-05-02 Thread Jae-Joon Lee
ax.twin returns a ParasiteAxesAuxTrans instance which is derived from the mpl's original Axes, but only drawing-related methods are meant to be meaningful. For example, this axes is never meant to be added to the figure and the draw method of this axes is never meant to be called. I haven't looked

[Matplotlib-users] Enforcing common view limits

2009-05-01 Thread Thomas Robitaille
Hello, I want to create two sets of axes for a figure that would be equivalent to ax = fig.add_subplot(111) ax2 = ax .figure .add_axes(ax.get_position(True),frameon=False,sharex=ax,sharey=ax) except that I want to be able to specify different tick locators and formatters for ax and ax2.