whytheq whytheq - 2 months ago 15
Python Question

Marker colour still not showing up

The markers produced by the following are just showing up as grey:

plt.style.use('ggplot')
ax1.scatter(x
, y
, edgecolor='black'
, color='black'
, marker='x'
, label='Cluster 1')

Answer

The marker probably looked grey because of the small line width, which can be controlled with the linewidths property:

plt.scatter(1, 1, s=300, edgecolor='black', 
            color='black', marker='x')
plt.scatter(2, 2, s=300, edgecolor='black', 
            color='black', marker='x', linewidths=2)

enter image description here