how to improve the font of matplotlib images ?

hello,

The text in matplotlib pictures is very fuzzy (certainly if you

compare that to fixed texts).

The picture below is from an html page, the html page is generated

from a python script,

which also produces the matplotlib pictures, which are stored in a

png-file and linked in the html page.

Are there ways to improve the font quality of the texts in the

MatPlotLib image ?

thanks,

Stef Mientki

![moz-screenshot.png|201x266](upload://uKNzQPO3xsG2YZCRg1RODrSjPUH.png)

Stef Mientki, on 2011-03-16 19:45, wrote:

hello,

The text in matplotlib pictures is very fuzzy (certainly if you compare that to fixed texts).
The picture below is from an html page, the html page is generated from a python script,
which also produces the matplotlib pictures, which are stored in a png-file and linked in the html page.

Are there ways to improve the font quality of the texts in the MatPlotLib image ?

Hi Stef,

Have you tried increasing the resolution of the images before you
save them, via plt.savefig("something.png",dpi=160) or by setting
the savefig.dpi rcParam to affect all plots. You might also play
with using different fontsize parameters when calling .text(...)

best,

ยทยทยท

--
Paul Ivanov
314 address only used for lists, off-list direct email at:
http://pirsquared.org | GPG/PGP key id: 0x0F3E28F7