Grid not showing on UIAxes
30 views (last 30 days)
Show older comments
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!
0 Comments
Accepted Answer
Jason
on 30 Apr 2021
1 Comment
Benjamin Kraus
on 30 Apr 2021
Edited: Benjamin Kraus
on 30 Apr 2021
Note that you can reset XTickMode and XTickLabelMode to 'auto' within App Designer as well as within code.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/603110/image.png)
More Answers (0)
See Also
Categories
Find more on 2-D and 3-D Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!