Shawn Zhang
Shawn Zhang

Reputation: 1769

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. However, the y axis has an error. What's the cause for that error?

Upvotes: 0

Views: 64

Answers (1)

Essex
Essex

Reputation: 6138

If I take the Arial's answer in order to give a general solution, you have a wrong typo in the y line.

You write :

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

But, after the r, you made instead of '

So, you just have to write :

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

And your problem is solved ;)

Upvotes: 2

Related Questions