MATLAB Answers

Set MarkerFaceColor to be filled by default

411 views (last 30 days)
John
John on 5 Dec 2018
Answered: Astha Singh on 12 Dec 2018
How can MarkerFaceColor be set to take on whichever color MarkerEdgeColor is by default?

  0 Comments

Sign in to comment.

Answers (1)

Astha Singh
Astha Singh on 12 Dec 2018
Hello John,
This can be achieved by setting the line properties in the plot.
The 'MarkerEdgeColor' is the outline color of the marker. Its default value is 'auto', which uses the same color as the 'Color' property of the line. This value can be accessed using the dot notation on the line object.
The following is an example code snippet:
l = plot(x,y,'o');
l.MarkerFaceColor = l.Color;

  0 Comments

Sign in to comment.

Products


Release

R2018b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!