Helvetica is the standard font for scientific plots. However, the default for matplotlib
is not helvetica. You can use the following tutorial for making the change.
[Update in 2022/11/11]
Just have the following line in the beginning of a notebook will take care of the problem.
%config InlineBackend.figure_format='svg'
import matplotlib.pyplot as plt
plt.rcParams['font.family'] = 'Helvetica'
For conda:
cd ~/anaconda/lib/python3.5/site-packages/matplotlib/mpl-data/fonts/ttf
In this folder I have necessary helvetica fonts.
Go one above:
cd ..
open ttf
This will get you a finder window for the folder contents.
Then go to:
~/anaconda/lib/python3.6/site-packages/matplotlib/mpl-data/fonts/ttf
~/anaconda/envs/py36/lib/python3.6/site-packages/matplotlib/mpl-data/fonts/ttf
Copy the following files from py3.5 to py3.6 ttf folder: Helvetica*.ttf
Then perform this:
rm ~/.matplotlib/fontList.py3k.cache
rm ~/.matplotlib/fontList.json
Also make sure you modify ~/.matplotlib/matplotlibrc
for the following line:
font.sans-serif : Helvetica, Lucida Grande, Verdana, Geneva, Lucid, Arial, Avant Garde, sans-serif