Set MarkerFaceColor to be filled by default

62 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?

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;

Categories

Find more on 2-D and 3-D Plots in Help Center and File Exchange

Products


Release

R2018b

Community Treasure Hunt

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

Start Hunting!