x and y ticks in pcolor plots

17 ビュー (過去 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 Center および File ExchangeSurface and Mesh Plots についてさらに検索

製品


リリース

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by