Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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?
share|improve this question
    
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
add comment

migrated from stackoverflow.com Oct 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

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1 Answer

up vote 0 down vote accepted

The problem seems to be solveable with matplotlib2tikz, by end the matplotlib script with

tikz_save( 'myfile.tikz' )

instead of

pyplot.show()
share|improve this answer
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.