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 commentaires

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
Tran Hoa le 26 Avr 2020
It works well. Thank you so much. Have a nice Sunday
Pratik Bajaria
Pratik Bajaria le 14 Avr 2021

Connectez-vous pour commenter.

Réponses (0)

Question posée :

le 25 Avr 2020

Commenté :

le 14 Avr 2021

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by