Hi,
I'm a beginner at python and I'm trying to extract specific columns from a text file, and then use those columns to make a line plot.
The files contains the following few lines of data:
# Raw SIFs at Crack Propagation Step: 0
# Vertex, X, Y, Z, K_I, K_II, K_III, J
0 , 2.100000e+00 , 2.000000e+00 , -1.000000e-04 , 0.000000e+00 , 0.000000e+00 , 0.000000e+00 , 0.000000e+00 ,
1 , 2.100000e+00 , 2.000000e+00 , 1.699733e-01 , 8.727065e+00 , -8.696262e-04 , -1.800691e-04 , 3.465355e-04 ,
2 , 2.100000e+00 , 2.000000e+00 , 3.367067e-01 , 8.907810e+00 , -2.548819e-04 , -2.789738e-04 , 3.610383e-04 ,
3 , 2.100000e+00 , 2.000000e+00 , 5.000400e-01 , 8.928808e+00 , -4.642099e-04 , -1.658399e-04 , 3.627425e-04 ,
I would like to plot:
vertex (1st column) versus K_I (5th column)
vertex (1st column) versus K_II (6th column)
vertex (1st column) versus K_III (7th column)
How do I extract the specific columns from this file and then plot a line graph from the columns?
Thanks