Regarding 3d plot color
조회 수: 2 (최근 30일)
이전 댓글 표시
I am trying to plot a 3d plot using surface function.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/923569/image.png)
How can I change the color of the plot?
댓글 수: 0
채택된 답변
추가 답변 (1개)
Cris LaPierre
2022년 3월 11일
The spacing between your values is so small that all you are seeing here is the EdgeColor. Try setting the color to 'none' and see if what you get is more like what you expected.
[X,Y] = meshgrid(-5:.5:5);
Z = Y.*sin(X) - X.*cos(Y);
surface(X,Y,Z);
view(3)
% with no EdgeColor
figure
surface(X,Y,Z,'EdgeColor','none');
view(3)
댓글 수: 0
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!