I want to color points uniquely only if there is a difference between the x & y values (eg abs(x - y) > 10).
How can I do that?
num = 1000
x = np.linspace(0,100, num = num)
y = np.random.normal(size = num)
plt.scatter(x, y, c='r', edgecolors='black')
plt.gca().spines['right'].set_color('none')
plt.gca().spines['top'].set_color('none')
plt.show()
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.