I have this piece of code
XuColor = {Red, Green, Blue};
XuNames = {"cat", "dog", "rat"};
fun2 = Thread[{Sin[x], Cos[x], Tanh[x]} -> XuNames];
Manipulate[
Legended[Plot[fs, {x, 0, 3 Pi}, PlotStyle -> XuColor],
Placed[LineLegend[XuColor, XuNames, LegendLayout -> "Row"],
Below]], {fs, fun2, ControlType -> TogglerBar}]
However the Legend is displaying the wrong colours (rat should be the tanh function in blue etc.) The colour of the curve actually depends on the order with which I click the toggler. If I have only the rat curve then it is displayed with the correct color (second image) How do I fix this?
fs
order/content is affected by your actions whilePlotStyle
setting stays the same and independent of those actions. $\endgroup$