# Set fonts in graphs equal to tex document [duplicate]

Possible Duplicate:
Set fonts in matplotlib graphs equal to tex document

I am writing my phd in LaTeX and I am generating all my graphical content in Python with the matplotlibpackage. For my TeX document, I am using a math-supported font -- e.g. Kurier Light Condensed -- and I would like to use the same font in my plots.

What is the easiest way to use the same font in my matplotlib figures and my corpus text in LaTeX?

• e.g. can I save my figures (vectorized ?) such that it takes the tex font when importing in tex?
• e.g. can I import the font in matplotlib and use it there?
-

## migrated from stackoverflow.comOct 10 '11 at 10:19

This question came from our site for professional and enthusiast programmers.

## marked as duplicate by Torbjørn T., Joseph Wright♦Oct 10 '11 at 14:26

The problem seems to be solveable with [matplotlib2tikz][1], by ending the matplotlib script with > tikz_save( 'myfile.tikz' ) instead of > pyplot.show() – ruben baetens Oct 9 '11 at 9:17
Have you had a look at the matplotlib page here for using tex rendering for fonts? – jozzas Oct 9 '11 at 22:40

tikz_save( 'myfile.tikz' )

pyplot.show()