필터 지우기
필터 지우기

Regarding 3d plot color

조회 수: 2 (최근 30일)
Amy Topaz
Amy Topaz 2022년 3월 11일
답변: Cris LaPierre 2022년 3월 11일
I am trying to plot a 3d plot using surface function.
How can I change the color of the plot?

채택된 답변

Voss
Voss 2022년 3월 11일
편집: Voss 2022년 3월 11일
Looks like you might want to set the 'EdgeColor' to 'none'
figure()
surface(1:1000,1:1000,randn(1000))
view([30 60])
figure()
surface(1:1000,1:1000,randn(1000),'EdgeColor','none')
view([30 60])

추가 답변 (1개)

Cris LaPierre
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)

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by