Adding Placeholders on Specific Increments Within a Graph
1 view (last 30 days)
Show older comments
My project instructions indicate that the red markers must appear on increments of 2mm, so 2,4,6,8,10 (mm). My current script generates the red square on every increment. How can I modify it to only appear on increments of 2mm?
d=[1,2,3,4,5,6,7,8,9,10];
YieldStrength=[21600,1.8788e+04,1.7543e+04,16800,1.6293e+04,1.5919e+04,1.5628e+04,1.5394e+04,15200,1.5036e+04];
x=d;
y=YieldStrength;
plot(x,y,'--bs','linewidth',0.5,'markersize',5,'markeredgecolor','r','markerfacecolor','r');
xlabel('Diameter (mm)')
ylabel('Yield Strength (psi)')
title('Yield Strength vs. Diameter')
0 Comments
Answers (0)
See Also
Categories
Find more on Line Plots 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!