Issue
I was hoping for this Python 3.11 script to render \
markers:
import numpy as np, matplotlib.pyplot as plt
plt.scatter([1, 2, 3], [3, 1, 4], marker='$\textbackslash$', c='b')
plt.show()
but it renders -
instead. How do I get \
or similar marker?
Solution
This link provides all the supported mathtext symbols you can use:
https://matplotlib.org/stable/users/explain/text/mathtext.html
For a backslash try marker=r'$\backslash$'
Answered By - Loocid
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.