Why does "pcolor" not display grid lines or ticks?
조회 수: 78 (최근 30일)
이전 댓글 표시
MathWorks Support Team
2014년 9월 16일
답변: MathWorks Support Team
2014년 9월 16일
I have created the following figure with "pcolor", but grid lines or ticks do not show up. How do I get them to display?
x=-2:0.1:2;
y=-2:0.1:2;
vals=rand(41);
p=pcolor(x,y,vals)
set(p,'EdgeColor','none')
grid on
채택된 답변
MathWorks Support Team
2014년 9월 16일
The grid is being drawn in the background layer of the figure. The colors in this figure are covering up the grid line.
You can bring the grid to the top layer by adding the following command right after the "grid on" command:
set(gca,'layer','top')
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Geographic Plots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!