MATLAB: Color plot arguments questions

colorplot

Hello ,what is the role of 'color' and col(d,:) arguments in the plot command?
plot(phi, eta * abs(J), 'color', col(d,:));
I couldnt find in the syntax bellow this pattern.
Thanks
‏‏לכידה.JPG

Best Answer

That is using the plot(___,Name,Value) syntax where ___ is replaced by phi, eta * abs(J). 'Color' is listed in the Name-Value Pair Arguments subsection of the Input Arguments section on the plot documentation page and col(d,:) is the value for that name.
Look at the "Add Title and Axis Labels" example on the plot documentation page for a demonstration of that syntax. In that case the RGB value used to color the line is [0, 0.7, 0.9] -- no red, a lot of green, and even more blue makes the line blue-green.