Grid not showing on UIAxes

54 ビュー (過去 30 日間)
Jason
Jason 2021 年 4 月 29 日
編集済み: Benjamin Kraus 2021 年 4 月 30 日
Hello. I am plotting some data on a Canvas in appdesigner, and the grid isn't showing.
(The plot is fine)
ax=app.UIAxes10;
IP=app.plotdata; %my data
plot(ax,IP,'-.','LineWidth',0.3);
grid(ax,'on');
ax.Color=[0.15 0.15 0.15];
ax.GridColor=[1 1 1];
ax.MinorGridColor=[1 0 1];
hold(ax,'on');
However, If i now do a
cla(app.UIAxes10,'reset')
then when I plot again it does show!

採用された回答

Jason
Jason 2021 年 4 月 30 日
Seems you need to do this.
set(gca, 'XTickMode', 'auto', 'XTickLabelMode', 'auto')
  1 件のコメント
Benjamin Kraus
Benjamin Kraus 2021 年 4 月 30 日
編集済み: Benjamin Kraus 2021 年 4 月 30 日
Note that you can reset XTickMode and XTickLabelMode to 'auto' within App Designer as well as within code.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSpecifying Target for Graphics Output についてさらに検索

タグ

製品


リリース

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by