I am able to make graph an X Y graph when extracting data from a text file, but I just need help highlighting one point on the function.
I have this list of data where the first column is the y values and the second is the x values. I would like to just highlight the value (0.718, 1.42676) when plotting this data from a text file.
1.3822;0.2
1.43985;0.3
1.45821;0.4
1.45764;0.5
1.4469;0.6
1.43022;0.7
1.42676;0.718
1.4101;0.8
1.38796;0.9
1.3647;1.0
import matplotlib.pyplot as plt
data_file = open('new3b.txt','r')
lines = data_file.readlines()
data_file.close()
kinf_list = []
den_list = []
for i in range(len(lines)):
lines[i] = lines[i].strip('\n')
line_list = lines[i].split(';')
kinf_list.append(float(line_list[0]))
den_list.append(float(line_list[1]))
X = den_list
Y = kinf_list
plt.plot(X,Y)
plt.xlabel('Density (g/cc)')
plt.ylabel('K-INF')
plt.title('Multiplication factor as a function of Density')
plt.plot(X[1:], Y[1:], 'ro')
plt.plot(X[0], Y[0], 'g*')
plt.grid()
plt.savefig('kinfVdenB2.png')
plt.show()
The code above works perfect, the only problem is that it does not highlight the desired point on the function.

