Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
Drexel University or The Math Forum.
|
|
Sia
Posts:
9
Registered:
11/30/12
|
|
Auto MarkerFaceColor
Posted:
Feb 19, 2013 10:36 AM
|
|
Hello everyone.
I plot with multi lines like this:
plot([0 1],[0 1; 0 2;0 3; 0 4],'o-'); matlab automatically chose the color for each line. I want to fill the markers with the same color as the lines. I try to use this:
plot([0 1],[0 1; 0 2;0 3; 0 4],'o-','MarkerFaceColor','auto');
but it dosn't work and the markers filled with white color. Is any body knows how can I overcome this? of course there is a solution that I wrote a for loop and plot a line in each loop and got the color on lines and fill it within the loop:
for a = 1:4 h = plot([0 1],[0 a],'o-'); set(h, 'MarkerFaceColor', get(h, 'Color')); end
But I dislike it. any solution? thanks.
|
|
|
|