2011-12-07

Small matplotlib tip

While making plots using matplotlib, I kept getting this error message when trying to write a string to a certain location in the plot:
UserWarning: findfont: Font family ['cmsy10'] not found.
Turns out, the fix is simple; add the following:

matplotlib.rc('text', usetex=True)
matplotlib is a wonderful Python package for doing plotting and analysis. It uses numpy.  Used interactively with the PyLab module, it feels close to Matlab. If you are a "scientific" user, I highly recommend checking it out.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.