简体   繁体   English

将乳胶写入轴

[英]Writing Latex onto Axis

plt.xlabel(r'$\rm log \: M_*$')

plt.ylabel(r’$\rm log \: M_{\bullet}$')

The x axis is able to be printed correctly. x轴能够正确打印。 However, the y axis has an error. 但是,y轴有误差。 What's the cause for that error? 该错误的原因是什么?

If I take the Arial's answer in order to give a general solution, you have a wrong typo in the y line. 如果我以Arial的答案给出一般解决方案,则您在y行中有一个错误的错字。

You write : 你写 :

plt.ylabel(r’$\rm log \: M_{\bullet}$')

But, after the r, you made ' instead of ' 但是,在r之后,您用'代替'

So, you just have to write : 因此,您只需要编写:

plt.ylabel(r'$\rm log \: M_{\bullet}$')

And your problem is solved ;) 并且您的问题得到解决;)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM