Options[f]={"a"->Red}
(* {a -> Red} *)
f[Name][x_,options:OptionsPattern[]] :=
Block[{},
Plot[x, {x,0,10}, PlotStyle -> OptionValue[f,"a"]];
OptionValue[f, "a"]
]
f[Name][x,"a"->Black]
The OptionValue of is always Red
Sols:
Options[f]={"a"->Red};
f[Name][x_,opts:OptionsPattern[f]]:=Plot[x,{x,0,10},PlotStyle->OptionValue[f,{opts},"a"]]
f[Name][x,"a"->Black]
fbut use aSubValueoff. – Sascha Sep 15 '16 at 08:15Options[f]={"a"->Red}; f[Name][x_,opts:OptionsPattern[f]]:=Plot[x,{x,0,10},PlotStyle->OptionValue[f,{opts},"a"]] f[Name][x,"a"->Black]– HyperGroups Sep 15 '16 at 08:32