Say I have defined some function like
f[p_] := Plot[Sin[p*x], {x, 0, 2 Pi}]
Now in most cases, I just need to specify the value of p
and retrieve the plot. In a very few cases, I also want to change some option of the plot, e.g. ImageSize -> Large
.
Since my function in reality is a lot more convoluted and already has various optional arguments, I am trying to avoid a solution like
f[p_, size_:Automatic] := Plot[Sin[p*x], {x, 0, 2 Pi}, ImageSize->size]
I have tried e.g.
f[*some value*] /. ImageSize -> Large
but to no avail. Is there any way to achieve what I am attempting? Apologies if I am missing some fundamental features of Mathematica...
Show[f[1],ImageSize-> 600]
? $\endgroup$ – andre314 May 28 '13 at 16:04