On Thu, Jul 19, 2012 at 4:30 AM, Damon McDougall
<damon.mcdoug...@gmail.com>wrote:
> On Thu, Jul 19, 2012 at 10:23:09AM +0200, Alexander Eberspaecher wrote:
> > On Wed, 18 Jul 2012 15:50:50 -0700
> > Brad Malone <brad.mal...@gmail.com> wrote:
> >
> > > Hi, I have a collection of 4 plots that I spent some time in
> > > constructing. They themselves include modifications of the axes
> > > labels, have rotated subplots next to them, etc. I need to be able to
> > > take these 4 plots and consolidate them into a single plot (referee
> > > suggestion to save space).
> >
> > Assuming you are using LaTeX to write your paper, you could use a LaTeX
> > solution. Here are some links:
> >
> >
> http://en.wikibooks.org/wiki/LaTeX/Floats,_Figures_and_Captions#Subfloats
> > ftp://ctan.tug.org/tex-archive/macros/latex/contrib/subfig/subfig.pdf
> >
> > This might be easier - and would also make your figures more reusable
> > (for e.g. presentations).
> >
>
> Personally, I use the subfigure package and it works really well. Also,
> +1 for reusable figures. The downside of the subfigure package is your
> latex code looks that much worse, but if the journal doesn't mind you
> using the subfigure package, then I recommend it.
>
>
I <3 the subfigure package, and I don't think it looks "worse". What is
nice about subfigure is that I can attach labels for each subfigure, which
can be referenced from the text. No, the problem with subfigure isn't that
it clutters the latex, which I don't think it does, the problem is that
some journals -- ametsoc, I am looking at you! -- will still count each
subfigure as a separate image in the calculation for the cost of publishing.
Unfortunately, there is no (easy) way in matplotlib to re-combine axes
objects into a new figure, which is what I think you are trying to do.
Your best bet is to break down your code a bit into separate functions for
each of the two plots that take an "ax" argument as well as pertinent input
parameters. Then create your gridspec for the new configuration and loop
over the subplots with an index like "for i in range(0, N*2, 2)" calling
"ax = subplot(gs[i])" and "ax2 = subplot(gs[i+1])".
I hope that helps!
Ben Root
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users