Store these X, Y coordinates in separate X, Y (1 pair for each Z range), and then draw them in several lines.
Conceptual example:
X1,Y1 = """store your Z0-30 here""" X2,Y2 = """store your z30-60 here""" X3,Y3 = """store your z60-z90 here""" X4,Y4 = """store your z90-120 here""" X5,Y5 = """store your z120-150 here""" fig=plt.figure() pyplot.plot(X1,Y1,color='black') pyplot.plot(X2,Y2,color='blue') pyplot.plot(X3,Y3,color='green') pyplot.plot(X4,Y4,color='yellow') pyplot.plot(X5,Y5,color='red') plt.show()
I would suggest using a scatter plot, it sounds a lot more suitable for what you are describing. Change pyplot.plot to pyplot.scatter in this case. You can use cmap to color them along the Z axis. You can also assign special markers to each group, as shown in this example.
Bas jansen
source share