Grid not showing on UIAxes

조회 수: 51 (최근 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 CenterFile Exchange에서 Specifying 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