I want to achieve something like this
Manipulate[Plot[Sin[x], {x, 0, r}, PlotRange -> {{0, 10}, {-1, 1}}], {r, 0.1, 10}]
but my function in place of Sin
is an expensive function, and since what I want is only change of plot range, there is no need to recalculate the values every time. So I try this
p = Plot[Sin[x], {x, 0, 10}];
Manipulate[Show[p, PlotRange -> {{0, r}, {-1, 1}}], {r, 0.1, 10}]
but the plot axes is changing as I change r. So is it possible to manipulate the plot range of a plot with a fixed axes, without reevaluate it every time?