Apply grid for figure
古いコメントを表示
Dear
I want to apply grid for 4 parts of the regression figure and I use this code
nntraintool('plot','plotregression')
set(findall(gcf,'-property','FontSize'),'FontSize',10)
grid on;
But only grid appear in the last figure (the forth figure I marked with yellow color). Could you help me ? Many thank

3 件のコメント
Bjorn Gustavsson
2020 年 4 月 25 日
grid on only set the grid to the current axes. To get grid.lines in all subplots you need to make each of the subplots current axes, typically something like this gets the job done:
for i1 = 1:4
subplot(2,2,i1)
grid on
end
However, sometimes when much decorations (adding of colorbars) have been made to an axes so that its position have changed from the default this can delete the subplot and create a default-located emty subplot with grid-lines. If that happens you might get away by manually making each subplot current and then manually call grid on.
HTH
Tran Hoa
2020 年 4 月 26 日
Pratik Bajaria
2021 年 4 月 14 日
回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Subplots についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!