Prev: MATLAB coding
Next: Put 1 image to another
From: fdfs tank on 14 Feb 2010 13:11 Hello, I have over six different lines in a plot for which I want to add a legend to. However, after the 6th line, the color of the legend begin to repeat themselves although the colors of the lines in the plot do not, why is that? How do I solve this? Thank you.
From: us on 14 Feb 2010 15:28 "fdfs tank" <miki(a)walla.co.il> wrote in message <hl9ebp$jse$1(a)fred.mathworks.com>... > Hello, > I have over six different lines in a plot for which I want to add a legend to. However, after the 6th line, the color of the legend begin to repeat themselves although the colors of the lines in the plot do not, why is that? > How do I solve this? > Thank you. that seems strange, indeed... can you show the most parsimonious snippet of code that reproduces this erroneous behavior... us
From: fdfs tank on 14 Feb 2010 16:46 Its hard to give the code but I can describe it in more detail: I defined a color vector: Color_String_List = ['r';'g';'m';'c';'b';'k';'y']; Then I run in a loop and for each line (7 in total) in assign a different color such that: for ii= 1: x plot(....,Color_String_List(ii)]) end then I try to add a legend as such: legend(legend_string,'Location','NorthWest') % The legend string is also of 7 strings matching the color. And then I get that the first six colors are fine and match perfectly the desired color of the lines in the plot but the 7th gets (only in the legend not the plot), the same color as the 6th line in the legend. Any ideas why that might be and how can this be solved?
|
Pages: 1 Prev: MATLAB coding Next: Put 1 image to another |