From: ntroutman <loc...@ya...> - 2009-03-19 17:46:26
|
The easiest solution is the "title" keyword for subplot: pylab.subplot(221, title='A Title for 221') I'm using matplotlib/pylab 0.98.3 -- NTroutman Tommy Grav wrote: > > I have a plot that is divided into four subplots. > > pylab.figure() > pylab.subplot(221) > pylab.plot(a,b,"k-") > pylab.subplot(222) > pylab.plot(a,b,"k-") > pylab.subplot(223) > pylab.plot(a,b,"k-") > pylab.subplot(224) > pylab.plot(a,b,"k-") > > I would like to add a title to the entire plot, but pylab.title() only > applies to the most recent subplot. I have tried > > pylab.figure() > pylab.subplot(111) > pylab.title("Title Here") > pylab.subplot(221) > pylab.plot(a,b,"k-") > pylab.subplot(222) > pylab.plot(a,b,"k-") > pylab.subplot(223) > pylab.plot(a,b,"k-") > pylab.subplot(224) > pylab.plot(a,b,"k-") > > but this does not work as I do not create a plot for > the subplot(111) instance. Is there some way of getting > the type of title I want easily? > > Cheers > Tommy > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > -- View this message in context: http://www.nabble.com/title-when-using-subplot-tp15066004p22605721.html Sent from the matplotlib - users mailing list archive at Nabble.com. |