I use matplotlib to do some plotting. But today I find out that it is very wired that in my plotting doesn't show the '-' on the y axis ticks. Could anyone give me some solutions for it? Thanks
The code is:
from pylab import *
import numpy
import scipy.io
from matplotlib.font_manager import FontProperties
from matplotlib import rc
rc('font',**{'family':'serif','serif':['Times New Roman'],'size':7})
figure(num=1, figsize=(2.9,2.4), dpi=300, facecolor='w', edgecolor='k')
x = np.linspace(0, 10, 1001, endpoint=True)
y = numpy.power(x/100, 3)
plot(x, y,'k-',label=r"Simulatied $\sigma_x$")
ylim(0,y.max())
ticklabel_format(style='sci',axis='y', scilimits=(0,0))
tight_layout()
savefig("xy.pdf")
(https://www.dropbox.com/s/rfpavget4rlyww7/yx.png)
It seems that this problem is caused by the font 'times new roman'. If I changed the font to 'Arial', the '-' appears
rc('font',**{'family':'sans-serif','sans-serif':['Arial'],'size':20})