필터 지우기
필터 지우기

How to change just the marker edge thickness and not the entire line thickness in plots?

조회 수: 23 (최근 30일)
I have cluttered data points. I want to change just the marker edge thickness in my plot. Using 'linewidth' property also changes the line's thickness. How to achieve this without changing the line's width?
  댓글 수: 1
Dyuman Joshi
Dyuman Joshi 2023년 9월 7일
Which function are you using to plot your data?
It would be better if you share the code (or a snippet of relevant code) you are working with.

댓글을 달려면 로그인하십시오.

답변 (1개)

Daniel Bengtson
Daniel Bengtson 2023년 9월 7일
Plot the data without markers then add a scatterplot overlay of whatever marker size and width you want.
x = rand(1,10);
y = rand(1,10);
figure;
plot(x,y);
hold on
scatter(x,y,100,'linewidth',3);
grid on
  댓글 수: 2
Rupsagar Chatterjee
Rupsagar Chatterjee 2023년 9월 8일
Thank you for the response. In this case how can we correctly get the legends? I am formatting my graphs for publishing in journal and legends is an absolute must.
Daniel Bengtson
Daniel Bengtson 2023년 9월 8일
x = rand(1,10);
y = rand(1,10);
figure;
a = plot(x,y);
hold on
b = scatter(x,y,100,'linewidth',3);
grid on
legend(a,'A');

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

제품


릴리스

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by