It seems this should be easy, by I just can not figure out how. I'm making many very similar style plots, so I want to make a function with all the default options specified. Sometimes I need to tweak a plot though, like changing a color or adding a legend, so I want to be able to pass options to it if I want. If a want to tweak the plot the following function works
fplot[f_, range_, opt_] :=
Plot[f, range, PlotLabel -> "A plot", Frame -> True, Axes -> False, opt];
fplot[Sin[x], {x, 0, 2 \[Pi]}, {PlotStyle -> Orange,
FrameLabel -> {{"y[x]", ""}, {"x", ""}}}]
But I also want my function to be able to handle me not giving it options, so I want the following to work as well
fplot[Sin[x], {x, 0, 2 \[Pi]}]
which now just gives me back the output:fplot[Sin[x], {x, 0, 2 [Pi]}]
I have loot at similar questions of passing optional options to a function, but I can't get either method to work, and they seem the require that I predefine the Options that I might later want to tweak. I would like to be able to tweak any of the options in Plot without having to predefine them. Passing list of options to Plot
Pass list of options to Plot3D
Any help is much apprechiated!