Specifying both marker type and marker size in a 'scatter' call

조회 수: 44 (최근 30일)
z8080
z8080 2019년 1월 9일
댓글: z8080 2019년 1월 10일
From the documentation of the scatter command, it seems that markers can be specified in their type or in their size, but not in both, depending on which syntax is used to call the function. Indeed, there is no specific MarkerSize property to this command.
How can I specify the markers' type and size simultaneously, in the same scatter command, or what is an easy workaround if it cannot be done with one command?
Many thanks!

채택된 답변

Adam Danz
Adam Danz 2019년 1월 9일
편집: Adam Danz 2019년 1월 9일
Check out the 3rd input to scatter()
If you're changing the size after plotting,
h = scatter(x,y);
h.SizeData = 60;
  댓글 수: 3
Adam Danz
Adam Danz 2019년 1월 10일
Well, that's not what I was suggesting. The better solution is to specify the size of the markers as you're calling scatter() by using the 3rd input to that function (see the documentation). The 3rd inputs specifies the marker size.
Sometimes it is necssary to change the marker size after it's been plotted which is my 2nd solution.
z8080
z8080 2019년 1월 10일
Got it. Thanks again!

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Scatter Plots에 대해 자세히 알아보기

태그

제품


릴리스

R2016a

Community Treasure Hunt

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

Start Hunting!

Translated by