How to change marker colors in Scatter3 plotted with patch

조회 수: 4 (최근 30일)
Renbo
Renbo 2014년 8월 18일
댓글: Renbo 2014년 8월 19일
I first use patch draw an isosurface, and set color of the sureface using facecolor. Then i use scatter3 to plot some data inside and outside the surface in the same figure. But i found i cannot change the color of marker color in scatter3 command using markersize or markerfacecolor.
Does any one meet the same problem or any ideal about this problem?
d1=patch(isosurface(X, Y, Z, r2, 1.5),'facecolor',RGB(3,:),'edgecolor','none');
scatter3(Data(IndexF,2),Data(IndexF,3),Data(IndexF,1),'Marker','*','MarkerEdgeColor','r');

답변 (1개)

Ahmet Cecen
Ahmet Cecen 2014년 8월 19일
You can change the marker shape and size from the GUI. If you want to see how it would be done in-line, do the changes in GUI, then say file->generate code and see how it was done.
  댓글 수: 1
Renbo
Renbo 2014년 8월 19일
Thanks Ahmet, i tried that before. It did not work. But i found a way to solve it, i use plot3 and then set linestyle is noneline. Finally, it works.
Anyway, thank you.

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

카테고리

Help CenterFile Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by