Not sure which graph you want to create but I can guide you how can you extract data from txt file and to create a graph.
To extract data from txt you can use this it will read every line from txt and convert it to lists using split method using empty space.
with open('your_file.txt', 'r') as datafile:
plotting = csv.reader(datafile, delimiter=' ')
Complete example for extraction and plotting:
import matplotlib.pyplot as plt
import csv
X = []
Y = []
with open('your_file.txt', 'r') as datafile:
plotting = csv.reader(datafile, delimiter=' ')
for ROWS in plotting:
X.append(float(ROWS[0]))
Y.append(float(ROWS[1]))
T.append(float(ROWS[2]))
plt.plot(X, Y)
plt.title('Line Graph using CSV')
plt.xlabel('X')
plt.ylabel('Y')
plt.show()