I use Matplotlib to analyze the results and create numbers. I need Greek characters in the legend and axis labels, including $ \ epsilon $. However, the resulting text does not distinguish between "normal" \ epsilon and \ varepsilon --- both are displayed as \ varepsilon. Here is a minimal example:
import numpy as np
from pylab import *
import matplotlib.pyplot as plt
t = np.arange(0.0, 1.0 + 0.01, 0.01)
s = np.cos(4 * np.pi * t) + 2
fig = plt.figure()
ax = fig.add_subplot(1,1,1)
ax.plot(t, s, 'k-', linewidth=2.0, label=r'$\epsilon$, $\varepsilon$, $\phi$, $\varphi$, $\sigma$, $\varsigma$')
plt.title(r'$\epsilon$, $\varepsilon$, $\phi$, $\varphi$, $\sigma$, $\varsigma$')
plt.xlabel(r'$t [M]$')
plt.ylabel(r'$\epsilon$, $\varepsilon$, $\phi$, $\varphi$, $\sigma$, $\varsigma$')
ax.legend(ncol=2, loc='lower left', fancybox=True)
plt.show()
When I process this on my Macbook (OS X El Capitan with Macports installations for TexLive and py27-matplotlib), everything displays correctly except \ epsilon.
ETA: The code does the right thing on another machine (Scientific Linux).
source
share