I'm trying to put an upright mu in my axes labels, but matplotlib just shows a square box.
Example code:
# -*- coding: utf-8 -*-
from matplotlib import pyplot as plt
plt.plot([1,2],[3,4])
plt.xlabel(u"A distance (μm)")
plt.show()
The weird thing is: when I run this directly in the interactive python interpreter that spyder has open when it starts, the μ shows up fine. When I run it from a .py file in a dedicated interpreter however, it shows up as '?' or as a square.
What does spyder's python interpreter do that I'm not? What do I need to import to make it work regardless of where the script is run from?
note: I know I could also do something like "A distance ($\mu$m)$, but that creates an italic mu which is typographically incorrect for units...