Oct-30-2017, 09:38 PM
I have a text file that consists of 3 columns.
0.column contain X coordinate
1.column contain Y coordinate
2.column contain 0 or 1
So far I draw all the coordinates:
Can you help me ?
Thanks
0.column contain X coordinate
1.column contain Y coordinate
2.column contain 0 or 1
So far I draw all the coordinates:
import matplotlib.pyplot as plt import numpy as np x, y = np.loadtxt("coordinates.txt",delimiter=' ',skiprows=1, usecols=(0,1),unpack=True) plt.plot(x,y) plt.show()I want to draw only those coordinates where the value of 2rd column is 1.
Can you help me ?
Thanks