Hi everyone, I have problems changing the color of the line of my plot. Even though there is the correct color of the plot in the legend, only the markers' color has the defined color, but the line itself doesn't change its color (as you can see in the attached picture). Here is an extract of my code, where I define the color of the plot:
c={'m','r','b','k'};m={'x','o','s','d'};l={'-','--','-.',':'};n=4for b_B=1:n b_B_aktuell=b_B_Werte(b_B); Erg2=Erg; Erg2(Erg2(:,b_B_Spalte)~=b_B_aktuell,:)=[]; %nur aktuellen b_B-Wert
Erg3=sortrows(Erg2,XSpalte); y=Erg3(:,YSpalte); x=Erg3(:,XSpalte); subplot(3,2,b_A_aktuell); hold on h=plot(x,y); grid on set(h,'color',c{b_B},'linestyle',l{b_B},'marker',m{b_B},'markerfacecolor',c{b_B},'markeredgecolor',c{b_B}); set(gca,'XTick',[0.5 1 2 3 4 5 10]) end
Best Answer