sequence of color on a surf plot

조회 수: 2 (최근 30일)
OLUWAFEMI AKINMOLAYAN
OLUWAFEMI AKINMOLAYAN 2022년 7월 9일
댓글: OLUWAFEMI AKINMOLAYAN 2022년 7월 9일
I wanted a sequence of colour for my Z axis from min to max.
The plot is still plain black after the code below. How can i fix this?
surf(value)
colormap hsv

채택된 답변

John D'Errico
John D'Errico 2022년 7월 9일
편집: John D'Errico 2022년 7월 9일
Surf plots each grid line, as a BLACK line. The black lines are useful, and help you to see the shape of the surface for smaller grids. But they are a problem if you have too many lines. If you have a LARGE array to plot, then the black lines dominate what you see, and you see nothing but black. For example:
Z = rand(500,500);
surf(Z)
But we also can plot it without the grid lines.
surf(Z,'edgecolor','none')
  댓글 수: 3
John D'Errico
John D'Errico 2022년 7월 9일
NO. Why would they be? Look at the examples in the help docs for surf. Or try a smaller example yourself.
Z = reshape(1:12,3,4)
Z = 3×4
1 4 7 10 2 5 8 11 3 6 9 12
surf(Z)
colormap pink
The black lines are now visible. As you can see, they connect the vertices in the lattice as drawn. Z was a 3x4 array.
mesh(Z)
The problem is when you have a huge surface, then the black lines dominate as I showed in my answer.
OLUWAFEMI AKINMOLAYAN
OLUWAFEMI AKINMOLAYAN 2022년 7월 9일
Thanks

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

추가 답변 (0개)

카테고리

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