This is likely an elementary question, but I can't figure out how to plot black points in a scatter plot!
import matplotlib.pyplot as plt
x = range(255)
y = range(255)
color = range(255)
plt.scatter(x, y, c=color)
This does not result in black dots!
Not sure if this is what you want, but why not simply specify the color to be black?
import matplotlib.pyplot as plt
x = range(255)
y = range(255)
# color = range(255) not needed?
plt.scatter(x, y, c='black')
Edit: To make things a little more clear maybe: You can specify colors in pyplot in different ways:
color="blue" or c="b")color=0.75)color='#eeefff')color=(0.5, 0.5, 0.5))If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With