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!