# Why are the colors messed up in this Plot?

I have a notebook which I cannot make to produce the accurate colors. I'll try to post the code hereafter. It looks a bit messy.

Needs["PlotLegends"]

b1BlSmall = {4.17891*^-1, 5.59816*^-1, 7.09626*^-1, 4.17891*^-1};
b1BlLarge = {3.15389*^-1, 4.73084*^-1, 6.85972*^-1, 3.62698*^-1};
b2BlSmall = {9.74949*^-1, 9.74949*^-1, 9.74949*^-1, 9.74949*^-1};
b2BlLarge = {9.74949*^-1, 9.74949*^-1, 9.74949*^-1, 2.00000};
dbhAdult = {1.00000*^1, 1.00000*^1, 1.00000*^1, 5.48121};

C2B = 2.0
pftColor = {Green, Darker[Green], Darker[Darker[Green]], Magenta};

b1BlLarge[[ipft]]/C2B*dbh^b2BlLarge[[ipft]] True

(a*b1BlLarge[[ipft]])/C2B*dbh^(c*b2BlLarge[[ipft]]) True
];

putzbl[dbh_] := (0.0856*dbh^2 - 0.376)/C2B;

Manipulate[
Plot[{putzbl[dbh],
Evaluate@Table[size2bl[dbh, ipft, a, b, c], {ipft, 1, 4}]}, {dbh,
0.0, 11.0},
PlotStyle -> Flatten[{Black, pftColor}]],
{a, 0.8, 1.2}, {b, 0.8, 1.2}, {c, 0.8, 1.2}]


But the graph that I get is like

Since I have five curves (the first is a function of its own, the last four are a family of functions of which only one is to manipulate) I was hoping to use a black line for the first curve and the four colors of pftColor for the latter. How do I do that?

EDIT

Manipulate[
Plot[Evaluate@
Flatten@{putzbl[dbh],
Table[size2bl[dbh, ipft, a, b, c], {ipft, 1, 4}]}, {dbh, 0.0,
11.0},
PlotStyle -> Flatten[{Black, pftColor}]],
{a, 0.8, 1.2}, {b, 0.8, 1.2}, {c, 0.8, 1.2}]


Produce the correct behavior

• Your code does not work (at least not in version 11.0.1). Can you make sure that your code works in a new notebook and using a fresh kernel (i.e., after Evaluation -> Quit Kernel)? – Felix Jan 17 '17 at 19:20
• You need to come up with a simpler example. The problem here is that you are using PlotStyle ->{color1,{color2, color3, color4}} when you should be using PlotStyle ->{color1, color2, color3, color4}. So replace that option in your code with PlotStyle-> Flatten[{Black,pftColor}] – Jason B. Jan 17 '17 at 19:30
• Evaluate is too deep in Plot to have an effect. But still this nested syntax of PlotStyle is not supported. Flatten those arguments. And inject the table with With. – Kuba Jan 17 '17 at 19:31
• Unfortunately I am using Mathematica 7 and I don't think I will be able to upgrade to 11 soon. I tried with flatten but I actually get the same exact figure but with a green color instead of the magenta. – Manfredo Jan 17 '17 at 21:18
• @Kuba I tried to look at the With function but it's not clear to me how I should use it in this case. Also if you can think of another, more effective, syntax to produce the plot let me know. – Manfredo Jan 18 '17 at 9:11

dbhAdult is not defined so here is a minimal example of how to fix your problems:
ClearAll[x];
`