import matplotlib.pyplot as plt
x = [1,2,3,4,5,-6,7,8]
y = [5,2,4,-2,1,4,5,2]
plt.scatter(x,y, label='test', color='k', s=25, marker="o")
plt.xlabel('x')
plt.ylabel('y')
plt.title('Test')
plt.legend()
plt.show()
plt.legend()
plt.show()
When the value is y changes to negative i am trying to change color='r' and when the value of x change to negative i am trying to change marker="o" to "x". I am new to matplotlib.
As a add on question, how to affect color and marker for x and y falling in ranges like -1 to -.5, .5 to 0, 0 to .5, .5 to 1. I am need of four markers in two colors amounting to 8 variations.