circle marker weird filling
Show older comments
The circle marker is doing something weird. How can I fix this? Is it the edge thing or the order or what? How do I 'smooth' the edges? Is it because it is filled? It doesn't do it when it's not 'filled'? C2 is an RGB colour code.
plot(time,strain,'-o','Color',C2,'LineWidth',lw,'MarkerSize',ms,'MarkerEdgeColor',C2,'MarkerFaceColor',C2);

3 Comments
Herline van der Spuy
on 25 Oct 2021
Edited: Herline van der Spuy
on 25 Oct 2021
When I try with my own system, or with MATLAB Online, the plot looks fine no matter how much I zoom. However, when I run it here with the MATLAB Answers facility, it does indeed look bad.
filename = 'https://www.mathworks.com/matlabcentral/answers/uploaded_files/777428/21seconds_time_strain.xlsx';
T = readtable(filename, 'VariableNamingRule', 'preserve');
B22 = [T.Time, T.Strain];
figure
% Temperature 22°C
% B22 is the data with time in first column and strain in second colomn.
time = B22(:,1);
strain = B22(:,2);
lw = 3;
ms = 7;
sz = 22;
C2 = [0.267 0.447 0.768];
plot(time,strain,'-o','Color',C2,'LineWidth',lw,'MarkerSize',ms,'MarkerEdgeColor',C2,'MarkerFaceColor',C2);
ax = gca;
set(gca,'fontsize',sz);
grid on
xlim([0 15]);
ylabel('Strain (%)','FontSize',sz);
xlabel('Time (s)','FontSize',sz);
Herline van der Spuy
on 26 Oct 2021
Accepted Answer
More Answers (1)
Image Analyst
on 22 Oct 2021
Try a dot
plot(time,strain,'b.-','Color',C2,'LineWidth',lw,'MarkerSize',ms,'MarkerEdgeColor',C2,'MarkerFaceColor',C2);
Categories
Find more on Graphics Performance in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
