I would like to produce a single plot of a function defined over discrete points in [-1,1] as I increase the number of points while shrinking the distance.
f[x_,en_]:= -x^2;
data = Table[f[x,en],{en,10,50,10},{x,-1,1,2/en}]
ListPlot[data]
This is almost what I want, I get all the different run of f
plotted with nice color, but the x-axis runs from 0 to 50 instead of going from -1 and 1.
I can obtain something closer to what I want if I do
data = Table[DiscretePlot[f[x,en],{x,-1,1,2/en}],{en,10,50,10}];
Show[data, PlotRange -> All]
but in this case all plots have the same color and are hard to distinguish
data = Table[{x,f[x,en]},{en,10,50,10},{x,-1,1,2/en}]; ListPlot[data]
? $\endgroup$