使用字母表作为 Matplotlib 标记

Mc *_*ile 2 python matplotlib marker

如何绘制字母表(例如字母“y”)作为标记matplotlib

Ser*_*ity 9

您可以使用MathText制作自定义标记。

import matplotlib.pyplot as plt

markers = ["$x$","$y$","$z$"]

ax = plt.gca()
for i, m in enumerate(markers):
    ax.plot((i+1)*[i,i+1],marker=m,lw=0)

plt.show()
Run Code Online (Sandbox Code Playgroud)

在此输入图像描述