## [Matplotlib-users] subplots with no space between limited to 6x6?

 [Matplotlib-users] subplots with no space between limited to 6x6? From: keflavich - 2009-06-29 14:30:00 ```Hi, I'm trying to make a large grid of subplots with no spacing between. The following code fails for any grid size larger than 6x6 by skipping a row and a column. for i in xrange(1,65): subplot(8,8,i) plot( [0,1] ) subplots_adjust(hspace=0,wspace=0) Is there a way around this problem? Thanks, Adam -- View this message in context: http://www.nabble.com/subplots-with-no-space-between-limited-to-6x6--tp24255224p24255224.html Sent from the matplotlib - users mailing list archive at Nabble.com. ```

 [Matplotlib-users] subplots with no space between limited to 6x6? From: keflavich - 2009-06-29 14:30:00 ```Hi, I'm trying to make a large grid of subplots with no spacing between. The following code fails for any grid size larger than 6x6 by skipping a row and a column. for i in xrange(1,65): subplot(8,8,i) plot( [0,1] ) subplots_adjust(hspace=0,wspace=0) Is there a way around this problem? Thanks, Adam -- View this message in context: http://www.nabble.com/subplots-with-no-space-between-limited-to-6x6--tp24255224p24255224.html Sent from the matplotlib - users mailing list archive at Nabble.com. ```
 Re: [Matplotlib-users] subplots with no space between limited to 6x6? From: Jae-Joon Lee - 2009-06-29 15:03:31 ```Yes, I can reproduce this with the current svn. I think what's happening is that, with larger number of grid, there is slight overlapping between each subplots (likely due to the floating point error). Note that subplot command deletes existing axes if they overlap with the new one. There would be several work-arounds. You may use non-zero spacing, eg, 0.001 worked for me. Or, you may manually add subplots to the figure to avoid any deletion of existing axes. from matplotlib.axes import Subplot fig = gcf() subplots_adjust(hspace=0.,wspace=0.) for i in xrange(1,65): ax = Subplot(fig, 8, 8, i) fig.add_subplot(ax) plot( [0,1] ) Regards, -JJ On Mon, Jun 29, 2009 at 10:29 AM, keflavich wrote: > > Hi, I'm trying to make a large grid of subplots with no spacing between.  The > following code fails for any grid size larger than 6x6 by skipping a row and > a column. > > for i in xrange(1,65): >    subplot(8,8,i) >    plot( [0,1] ) >    subplots_adjust(hspace=0,wspace=0) > > Is there a way around this problem? > > Thanks, > Adam > -- > View this message in context: http://www.nabble.com/subplots-with-no-space-between-limited-to-6x6--tp24255224p24255224.html > Sent from the matplotlib - users mailing list archive at Nabble.com. > > > ------------------------------------------------------------------------------ > _______________________________________________ > Matplotlib-users mailing list > Matplotlib-users@... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > ```
 Re: [Matplotlib-users] subplots with no space between limited to 6x6? From: Adam - 2009-06-29 15:10:44 ```Thanks Jae-Joon, that worked. Adam On Mon, Jun 29, 2009 at 9:03 AM, Jae-Joon Lee wrote: > Yes, I can reproduce this with the current svn. > > I think what's happening is that, with larger number of grid,  there > is slight overlapping between each subplots (likely due to the > floating point error). Note that subplot command deletes existing axes > if they overlap with the new one. > > There would be several work-arounds. You may use non-zero spacing, eg, > 0.001  worked for me. Or, you may manually add subplots to the figure > to avoid any deletion of existing axes. > > from matplotlib.axes import Subplot > > fig = gcf() > > subplots_adjust(hspace=0.,wspace=0.) > > for i in xrange(1,65): >    ax = Subplot(fig, 8, 8, i) >    fig.add_subplot(ax) >    plot( [0,1] ) > > Regards, > > -JJ > > > On Mon, Jun 29, 2009 at 10:29 AM, keflavich wrote: >> >> Hi, I'm trying to make a large grid of subplots with no spacing between.  The >> following code fails for any grid size larger than 6x6 by skipping a row and >> a column. >> >> for i in xrange(1,65): >>    subplot(8,8,i) >>    plot( [0,1] ) >>    subplots_adjust(hspace=0,wspace=0) >> >> Is there a way around this problem? >> >> Thanks, >> Adam >> -- >> View this message in context: http://www.nabble.com/subplots-with-no-space-between-limited-to-6x6--tp24255224p24255224.html >> Sent from the matplotlib - users mailing list archive at Nabble.com. >> >> >> ------------------------------------------------------------------------------ >> _______________________________________________ >> Matplotlib-users mailing list >> Matplotlib-users@... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> > ```