Since I just posted an almost-identical question, it's no surprise that I agree this would be a useful feature. Reason #1) I create hundreds of quick throwaway figures every day, often in an automated way, and don't have time to fine-tune them. Reason #2) a newbie to matplotlib might be turned off by one "ugly" figure, when in fact matplotlib is capable of producing beautiful figures.
The previous suggestion I received was to create a convenience wrapper for the subplot function with some idiot-proof defaults. Can you propose a set of rcParams that satisfies this criterion? This one fixes the specific issue you raise: matplotlib.rcParams['figure.subplot.hspace'] = .5 Although it will rear its ugly head again once the number of subplots reaches 5 or 6. Personally I rarely use more than 4x4, and if I did I would certainly increase the figsize. I find that setting all text sizes to be as small as possible also helps. My most commonly encountered issue is overlapping x-tick labels, because most of my plots have "samples" on the x-axis and therefore hundreds of thousands of points. The real solution of course is to calculate exactly where every piece of text actually is, detect overlaps, and adjust. That is certainly beyond my ability or inclination to implement. In the mean time, it would be nice to have a simple "idiot-proof" flag that blindly fixes some common problems. On Fri, May 6, 2011 at 1:20 AM, Daniel Mader <danielstefanma...@googlemail.com> wrote: > Hi, > > almost every time I create a somewhat more complex figure I have to > fight with the not too smart positioning of the plots and the size of > margins around the axes. From many postings here I have learned that > this is the absolute intention, i.e. it is broken by design unless the > programmer takes care about this. > > I have to admin that I do not really get this idea. I am aware that > the defaults will not change anytime soon and so I'd like to ask for > an "idiot-proof" mode: this could be enabled by an rcParam and take > care of proper dimensions, scale axis labels, titles, margins etc so > that they don't cover. > > Here's an example for a matplotlib script which is a simple as it can > get and demonstrates the broken layout which a user gets by default. > > import scipy > import pylab > > x = scipy.linspace(-50,50, 100) > y1 = scipy.rand(100) > y2 = scipy.sin(x) > y3 = y1 + y2 > > fig = pylab.figure() > ax1 = fig.add_subplot(311) > ax2 = fig.add_subplot(312) > ax3 = fig.add_subplot(313) > > ax1.plot(x, y1) > ax2.plot(x, y2) > ax3.plot(x, y3) > > ax1.set_title('some title') > ax2.set_title('some title') > ax3.set_title('some title') > > pylab.show() > > Of course, one can adjust the figsize but the results are still far > from being adorable. The spacing around the sublplots increases for no > apparent reason while the spacing between the subplot remains the same > so that everything looks cramped... > > > Thank you many times in advance, > best regards, > > Daniel > > ------------------------------------------------------------------------------ > WhatsUp Gold - Download Free Network Management Software > The most intuitive, comprehensive, and cost-effective network > management toolset available today. Delivers lowest initial > acquisition cost and overall TCO of any competing solution. > http://p.sf.net/sfu/whatsupgold-sd > _______________________________________________ > Matplotlib-users mailing list > Matplotlib-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > ------------------------------------------------------------------------------ WhatsUp Gold - Download Free Network Management Software The most intuitive, comprehensive, and cost-effective network management toolset available today. Delivers lowest initial acquisition cost and overall TCO of any competing solution. http://p.sf.net/sfu/whatsupgold-sd _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users