Change all Options of Plot Dynamically

I am trying to make a series of changes in the appearance of the Plot of some function. I am trying to use Manipulate for my experiments. I tried to change the following code

Manipulate[ Plot[Sin[x], {x, 0, Pi}], {p, HoldForm /@ Options[Plot]}, {q, InputField}]

so that when, for example, p is AxesOrigin ->Automatic and q is changed to {-3,5} then the plot will be updated with Axes Origin at {-3,5}. Similar if p is taken AxesLabeL->None and p is changed to "A label" then the last plot will refreshed showing the label "A label" at the top(without affecting any changes already made in other options like AxesOrigin above).

• maybe this can get you started? Manipulate[With[{p1=p[[1,1]]},Plot[Sin[x],{x,0,Pi},p1-> q]], {{p,{PlotLabel-> None}, "Options"},Thread[{Options[Plot]}]},{{q,Null,"Value"},InputField}] – chuy Nov 5 '13 at 19:16

Here's way along the lines in the OP:

Manipulate[
With[{opts = Sequence @@ opts},
Plot[Sin[x], {x, 0, Pi}, opts]], {p,
PopupMenu[Dynamic[p, (q = opts[[#, -1]]; p = #) &],
Thread[Range@Length@# -> #] &[First /@ Options[Plot]]] &},
{{q, Null},
InputField[
Dynamic[q, (opts = ReplacePart[opts, {p, -1} -> #]; q = #) &]] &},
{opts, None},
TrackedSymbols :> {opts}, Initialization :> (opts = Options[Plot]) Here's a different take on how to present the options, using SlideView rather than drop down, which is pretty nice.

I'm sorry for the fast animation, I had to drop a lot of frames to make its size decent.

{names, symbols, values} =
Transpose[Options[Plot] /. (Rule[x_, y_] | RuleDelayed[x_, y_]) :> {x, Unique[x], y}];
tables =
Pane[name, 150],
InputField[Dynamic[symbol]]
}], {names, symbols}], 10];
Panel[
Column[{
Dynamic@
Panel[Pane[
Plot[Sin[x], {x, 0, 2 Pi},
BaseStyle -> {Background -> White}]],
SlideView[
TableForm /@ tables
]
}]
] • gifsicle -O3 --colors 256 original.gif > smaller.gif brings it down from 1.8M to 784K – ssch Nov 7 '13 at 22:59
• @ssch Nice, I'll remember that. Exported it from MMA this time. – C. E. Nov 8 '13 at 7:11

I don't know if the following code will satisfies you. Of course one could change the code to add more controls like changing 0 and 2Pi corners e.t.c.

f[p_, pt : {___}] := Plot[p[x], {x, 0, 2 Pi}, pt]

Manipulate[
If[q =!= Null, PrependTo[r, p[[1, 1]] -> q]]; {p[[1, 1]] -> q,
f[Sin, r]}, {p, HoldForm /@ Options[Plot]}, {q,
InputField}, {{r, {Axes -> True}}, None}, TrackedSymbols -> {q}]


or similarly,

  Manipulate[If[q =!= Null, PrependTo[r, p[[1, 1]] -> q]];
r = DeleteDuplicates[r, #1[] == #2[] &];
Column@{r, p[[1, 1]] -> q, f[Sin, r]}, {p,
HoldForm /@ Options[Plot]}, {q, InputField}, {{r, {Axes -> True}},
None}, TrackedSymbols -> {q}]

• much much better than mine! – chuy Nov 5 '13 at 20:37

Disclaimer -> this is quick and dirty (emphasis on dirty) first attempt:

Manipulate[
plot[Sin[x],{x,0,Pi},Sequence@@{s,p[[1,1]]-> q}],
{{p,{PlotLabel-> None}, "Options"},