SourceForge logo
SourceForge logo
Menu

matplotlib-users

From: acoffeemug <joa...@gm...> - 2010年04月29日 16:40:09
Hi,
I have tried to make a plot using the twinx() method to get different left
and right scales in the same plot.
The plot looks fine, but the y labels end up outside the figure. The same
problem can be seen in the example from the matplot homepage:
http://matplotlib.sourceforge.net/examples/api/two_scales.html
Here the y labels 'exp' and 'sin' are outside the plot.
Does anyone know a good fix for this? Preferably one which doesn't involve
manual resizing?
I use ipython with -pylab to generate the plots.
Best regards,
Jóan Petur
-- 
View this message in context: http://old.nabble.com/Labels-end-up-outside-figure-tp28402985p28402985.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
From: Jae-Joon L. <lee...@gm...> - 2010年04月30日 14:10:11
On Thu, Apr 29, 2010 at 12:40 PM, acoffeemug
<joa...@gm...> wrote:
> Does anyone know a good fix for this? Preferably one which doesn't involve
> manual resizing?
http://matplotlib.sourceforge.net/faq/howto_faq.html#automatically-make-room-for-tick-labels
While example in the link try to make a room for ticklable, a same can
be done with a label.
If you don't mind your figure size slightly changed, you may try
savefig("yourfilename", bbox_inches="tight")
Regards,
-JJ
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /