How to remove strange space in LaTeX-style maths in matplotlib plot

Viewed 2088

I am using the following as an axis label in matplotlib:

"Pixel Radiance ($W/m^2/\mu m$)"

But when I produce a graph with this as the y-axis label I get the image below, which has a strange space between the m^2 and the \mu which makes it look rather strange. How can I remove this strange space?

example graph

A reproducible example, without using any of my own data, is:

from matplotlib.pyplot import *
plot([1, 2, 3], [1, 2, 3])
ylabel("($W/{m^2}/\mu m$)")
2 Answers
Related