Apply grid for figure
Afficher commentaires plus anciens
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 commentaires
Bjorn Gustavsson
le 25 Avr 2020
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
le 26 Avr 2020
Pratik Bajaria
le 14 Avr 2021
Réponses (0)
Catégories
En savoir plus sur Subplots dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!