Samuel, Trying to manipulate variables with leading underscores is discouraged--that is the meaning of the leading underscores.
Changing the shared status of axes involves changes in additional variables. This could be encapsulated in a single method. It might be very easy, or complexities and gotchas might turn up. How important is it? What is the problem with setting the shared status when you make the axes, as in your first example? Eric Samuel GARCIA wrote: > Hi all, > is there a possibility to change the sharex and sharey after creating a > axes ? > > For example this perfectitly work : > > import pylab > fig = pylab.figure() > ax1 = fig.add_subplot(121) > ax2 = fig.add_subplot(122, sharex=ax1) > ax1.plot(rand(5)) > ax2.plot(rand(5)) > pylab.show() > > But when I try naively to change _sharex and _masterx after creating > the axes it doesn't work : > > > import pylab > fig = pylab.figure() > ax1 = fig.add_subplot(121) > ax2 = fig.add_subplot(122) > ax1.plot(rand(5)) > ax2.plot(rand(5)) > ax2._sharex = ax1 > ax1._masterx = True > pylab.show() > > What 's the solution ? > thank you > > Samuel > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > > > ------------------------------------------------------------------------ > > _______________________________________________ > Matplotlib-users mailing list > Matplotlib-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/matplotlib-users ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users