On Tue, Jan 22, 2013 at 12:22 PM, Jonathan Slavin
<jsla...@cfa.harvard.edu>wrote:

> Hi,
>
> I'm having some trouble with using twiny and a title on the plot.  The
> title is writing over the axis label -- and even the tick labels.  I've
> tried tight_layout() but it doesn't seem to help.  I could use fig.text
> instead of title and place the title text where I want it (with a bit of
> fiddling), but it'd be nice to have a more elegant solution.
>

Try this is a workaround:
fig, ax1 = plt.subplots()
ax2 = ax1.twiny()
ax1.plot(np.random.randn(50), 'gs')
ax2.plot(np.random.randn(50), 'bo')
ax1.set_title('Test Title')
ax2.xaxis.tick_bottom()
plt.show()

Does that help?
-paul
------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnnow-d2d
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to