I am plotting data in Julia. To extract the y-values I was using a nested for loop
y = []
for i in range(0.01,1,step=0.05)
for j in range(0.01,2,step=0.002)
a = f(i,j)
push!(y,a)
end
end
And now when ever I run:
plot(x,y)
I get discrete not very nice plots with lines constantly jumping from the beginning to the end.
I am also using moving average function:
moving_average(vs,n) = [sum(@view vs[i:(i+n-1)])/n for i in 1:(length(vs)-(n-1))]
plot(x,moving_average(y,4)
So I was curious is there a way to transform the y-matrix in a way to get rid of these lines in the plot and still be able to apply the moving_average function in the same way?
