[Matplotlib-users] size of the picture exported from matplotlib

Vincent Douce Mathoscope mathoscope at netcourrier.com
Thu Nov 30 01:20:50 EST 2017



hii 	
for the book iwrite i need fonts in size 10 
i put this size to the fonts and the exported picture, when included in my TeXmacs document without changing the size, present fonts that fits approximatively to this size of 10 
but my pictures are really to big ; if i reduce them (they are png) then of course the fonts are reduced also 
i have been searching on internet since 2 days, looking for the right instruction to fix the size of the picture 
i did not find my answer here : 
https://stackoverflow.com/questions/8775622/exact-figure-size-in-matplotlib-with-title-axis-labels <https://stackoverflow.com/questions/8775622/exact-figure-size-in-matplotlib-with-title-axis-labels>
here the topic seemed to be mine : 
http://scipy-cookbook.readthedocs.io/items/Matplotlib_AdjustingImageSize.html <http://scipy-cookbook.readthedocs.io/items/Matplotlib_AdjustingImageSize.html>
but this code, just copy-pasted from this link : 
import pylab
F = pylab.gcf()
F.set_figsize_inches( (DefaultSize[0]*2, DefaultSize[1]*2) )
gave this message : 
AttributeError: 'Figure' object has no attribute 'set_figsize_inches' 

of course i can fix the font to some random value say 24 and reduce the picture to a random % and, by trials and approximations, find the right size and the right % so that the text in my pictures seem to be 10 

i'm sure it must exist a more satisfying way  but can not find it 

i am just missing this point to start working 

thanks if you have ideas.
        –––––––––––––––––––––––––– 
                  Vincent Douce 
               :=: Mathoscope :=: 
             http://mathoscope.xyz <http://mathoscope.xyz/>
                 06°13°11°07°26 
          Bagnères de Bigorre 65200
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/matplotlib-users/attachments/20171130/bb5f7c27/attachment.html>


More information about the Matplotlib-users mailing list