I am going to plot the results of a for loop and if statement inside of it.
I want to have plot with lines but once I use plt.plot the plot will be empty but once I try scatter I have plot with dots. What should I do to have plot of Unu vs nu with lines not dots?
if inp==0:
print('***')
print('0 Is not acceptable ')
print('***')
else:
for xx in range(1,819):
...# lines of code
if inp<0:
if lim > 1:
pass
else:
nu = dfimppara.iloc[xx, 1] *115
plt.scatter(Unu(xx), nu)
else:
...# lines of code
plt.show()
plt.plot. Instead, what you need is to save your data points in some list/array and then plot them usingplt.plot- Sheldoreelseand append them inside the secondelsewithnuandxx. Then once the loop is finished, plot outside - Sheldore