필터 지우기
필터 지우기

x and y ticks in pcolor plots

조회 수: 50 (최근 30일)
Cesium Modern
Cesium Modern 2023년 2월 16일
댓글: Les Beckham 2023년 2월 16일
I have a p-color plot with the 'EdgeColor' property set to none.
This not only eliminates the grid (which I do not want) but removes the x and y-axes ticks.
How can I enable these ticks and show them outside the plot, with the following
set(gca,'TickDir','out')
Below is what I am trying to achieve with the ticks

채택된 답변

Voss
Voss 2023년 2월 16일
Set the axes property 'Layer' to 'top' in order to get the grid to show up on top of the pcolor surface.
% a pcolor with EdgeColor 'none':
set(pcolor(zeros(100)),'EdgeColor','none')
% set axes properties:
set(gca(), ...
'XGrid','on', ...
'YGrid','on', ...
'Layer','top', ...
'TickDir','out', ...
'TickLength',[0.05 0.05])
  댓글 수: 4
Cesium Modern
Cesium Modern 2023년 2월 16일
Thanks, Les Beckham and Voss. Appreciate the help!
Les Beckham
Les Beckham 2023년 2월 16일
You are quite welcome.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Geographic Plots에 대해 자세히 알아보기

제품


릴리스

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by