I am using Manipulate to plot a function that takes a fair amount of time to be plotted. Once it is done I would like to change the y-range where it is plotted. To avoid that the function is evaluated again I am trying to use Dynamic. Following an example in Wolfram Documentation I constructed something like this:
Manipulate[
Plot[f[a,x],{x,0,xmax},PlotRange->Dynamic[{0,xmax}]],
{a,amin,amax},{xmax,0.1,5}
]
However, I get an error:
General::prng: Value of option PlotRange -> {0,0.1} is not All, Full, Automatic, a positive machine number, or an appropriate list of range specifications.
Any ideas on how to solve this?