Reputation: 7451
I have the following marker in my python matplotlib scatter plot:
made by the code:
plt.scatter(x,y,c=z,cmap=cm.bwr,marker='X',s=800,linewidth=1,edgecolor='k')
I want the X to be the same size, but I want the red part to be 'thinner'. More like a real 'X' I guess.
Is this possible?
Thank you.
Upvotes: 5
Views: 6628
Reputation: 339170
The thicker the edge, the thinner the face. Alternatively a marker "x"
can be used
import matplotlib.pyplot as plt
for lw in [1,3,5,7]:
plt.scatter([lw], [1], c="gold", s=1000, marker="X",
linewidth=lw, edgecolor='k')
plt.scatter([lw], [0], c="gold", s=lw*300, marker="x")
plt.margins(.2)
plt.show()
Upvotes: 11