Friday, July 5, 2019

QuickTip: Math Font in Matplotlib

Matplotlib (v2 and higher) uses "mathtext" to render math by default. It is quite capable, but I don't like the default font, and prefer the classic "Computer Modern" font.

You can fix this globally by modifying the rc file in your custom-style file (use the command matplotlib.get_configdir() to find location) by adding the line:

mathtext.fontset : cm

If you want to render all text using LaTeX (this slows down rendering somewhat), then use:

text.usetex : true


Wednesday, July 3, 2019

Snip Math

Mathpix Snip looks like an amazing tool.

You take a screenshot of some math and get it rendered in LaTeX.

The process as illustrated on their website:



It is available for download on all major OS.