Hi! If I
Plot[{Sin[x],Cos[x]},{x,0,2π}]
then I get the sine plotted in the default blue, and the cosine in the default orange. The command
key="one";
Switch[key,"one",{Sin[x],Cos[x]},"two",{-Sin[x],-Cos[x]}]
gives {Sin[x],Cos[x]}
. Following this up with
Plot[%,{x,0,2π}]
results again in both curves being plotted in different colors. However
Plot[Switch[key,"one",{Sin[x],Cos[x]},"two",{-Sin[x],-Cos[x]}],{x,0,2π}]
results in both curves being plotted in the same color, and I could not manage to manually change that by using the option PlotStyle
option.
Why is that so, and how can I change the plot colors if I use Plot with Switch in this way?
An example notebook is attached!
Thanks for help! : )