How to make unfilled plot points?

83 ビュー (過去 30 日間)
Brendan Clark
Brendan Clark 2021 年 4 月 5 日
コメント済み: Brendan Clark 2021 年 4 月 6 日
How do I get my plot points to be unfilled instad of filled?
I just about have this the way I want it
right now my data points are just filled points, I'm trying to get them to be unfilled circles with line size 6.
If somebody could let me know how to swap to the unfilled points that would be awesome.
Also, is there a way to make my plot points more concise?
Thanks!
clear variables
clc
t=0:.5:20;
r=385-88*(exp(-t/2.8));
p=plot(t,r,'LineWidth',3);
hold on
plot(t(1),r(1),'ro', 'linewidth', 6,'markerfacecolor','w')
plot(t(5),r(5),'ro', 'linewidth', 6,'markerfacecolor','w')
plot(t(9),r(9),'ro', 'linewidth', 6,'markerfacecolor','w')
plot(t(13),r(13),'ro', 'linewidth', 6,'markerfacecolor','w')
plot(t(17),r(17),'ro', 'linewidth', 6,'markerfacecolor','w')
plot(t(21),r(21),'ro', 'linewidth', 6,'markerfacecolor','w')
plot(t(25),r(25),'ro', 'linewidth', 6,'markerfacecolor','w')
plot(t(29),r(29),'ro', 'linewidth', 6,'markerfacecolor','w')
plot(t(33),r(33),'ro', 'linewidth', 6,'markerfacecolor','w')
plot(t(37),r(37),'ro', 'linewidth', 6,'markerfacecolor','w')
title('Standard vs. Measured Temperature')
xlabel('Time [ sec ]')
ylabel('T(t)[K]')
legend('simulated','measured')
  1 件のコメント
Brendan Clark
Brendan Clark 2021 年 4 月 5 日
PS. I forgot to delete the markerfacecolor command from the script on each plot point, that was an attempt to turn the middle white.

サインインしてコメントする。

採用された回答

David Fletcher
David Fletcher 2021 年 4 月 5 日
編集済み: David Fletcher 2021 年 4 月 5 日
Think you'll find it's due to the linewidth - change it to 1 and they shouldn't be filled. MarkerSize changes the size of the points.
  2 件のコメント
David Fletcher
David Fletcher 2021 年 4 月 5 日
Brendan Clark
Brendan Clark 2021 年 4 月 6 日
Oh dang, that was a silly mistake, thank you for helping out with that.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeTwo y-axis についてさらに検索

タグ

製品


リリース

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by