I am struggling with the action of clearing a plot in Julia. Every time I modify the contents of the variable that is to be plotted, it gets overlaid instead of redrawn. My solution for this is to restart my IDE (vscode) every time I want a new plot to be drawn that doesn’t have an overlay of the old values. Is there a simple solution to preventing this from happening? I’ve attached a graph with my function drawn, as well as my plot function (+40 in this example) to illustrate the overlaid nature of my graphs.
plot(y + 40) xlabel("time") ylabel("points") title("Data with Linear Trend") grid("on") gcf()