我尝试在matplot lib中使用乳胶格式,但它没有给我一行空间。这是我的代码
plt.figure(103)
plt.title('$V_x mean and fitting$')
plt.plot(vx_mean_fit[sig_fit],Sig[sig_fit],label='$Vx mean fit$')
plt.xlabel('$V_x$')
plt.ylabel('$z/d$')
plt.legend()
答案 0 :(得分:1)
您可以使用原始字符串:
r'$V_x mean and fitting$'
或者您可以显式地转义空格:
'$V_x\ mean\ and\ fitting$'
答案 1 :(得分:1)