Bug in R2014b? Markersize specifier resets marker type

조회 수: 8 (최근 30일)
Wouter
Wouter 2014년 10월 9일
댓글: Wouter 2014년 10월 9일
I want to make a plot with a non-default marker ('s') and a non-default markersize (5). However, the markersize specifier seems to reset the marker type. I'm expecting to see larger squares in figure 2 (see code below), but instead I'm seeing larger circles. I recently upgraded to Matlab 2014b, and I don't think I had this behavior before.
x = 0:0.5:10
y = x.^2
figure(1)
plot(x,y,'marker','s')
figure(2)
plot(x,y,'marker','s','markersize',5)

채택된 답변

Mischa Kim
Mischa Kim 2014년 10월 9일
Hello Wouter, the default marker size is 6. So you probably won't see much of a difference btw. the two plots. Try instead
x = 0:0.5:10;
y = x.^2;
figure(1)
plot(x,y,'marker','s')
figure(2)
plot(x,y,'marker','s','markersize',8)
  댓글 수: 1
Wouter
Wouter 2014년 10월 9일
I'm an idiot. It only appeared to change shape because it was so small the edges of the square are not resolved very well.
Thanks!

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Graphics Performance에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by