Fill function with colormap
조회 수: 7 (최근 30일)
이전 댓글 표시
Hello,
I have a question about the function "fill" of Matlab. I need to fill a surface with a color gradation. Is it possible to use colormap instead of colorSpec?
Thank you
Lamiaa
댓글 수: 0
답변 (1개)
Walter Roberson
2013년 4월 3일
No. fill() does not accept a colormap specification.
If you want to use a surface graduation, you should see this Tip from the documentation page:
If C is a column vector or a matrix, fill uses a linear interpolation of the vertex colors to generate polygons with interpolated colors. It sets the patch graphics object FaceColor property to 'interp' and the elements in one column become the CData property value for the respective patch object. If C is a column vector, fill replicates the column vector to produce the required sized matrix.
Or you could just call patch() directly, as fill() is really just creating patches for you.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Color and Styling에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!