I solve the problem. The issue was in plot_surf_check, there is a figure command triggers a new figure each time I run the code, by simply deleting it, I can create the subplot I want.
subplot and surfc using graphic handle
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Dear all:
I would like to make a figure of 4 x 2 subplots, I had the following code:
surf_check = figure('Name','Likelihood Region','PaperType','A4',...
'PaperOrientation','landscape','units','normalized',...
'outerposition',[0 0.05 1 0.95]);
subplot(4,2,1)
minlb = [0.4;450];
maxub = [0.8;500];
surf1 = plot_surf_check('theta', 'var_eps_r', param_est,minlb,maxub,...
param_fix,kalman_init,VarObs,index);
subplot(4,2,2)
minlb = [0.4;450];
maxub = [0.9;500];
surf2 = plot_surf_check('alpha', 'var_eps_r', param_est,minlb,maxub,...
param_fix,kalman_init,VarObs,index);
subplot(4,2,3)
minlb = [0.97;450];
maxub = [0.999;500];
surf3 = plot_surf_check('beta', 'var_eps_r', param_est,minlb,maxub,...
param_fix,kalman_init,VarObs,index);
subplot(4,2,4)
minlb = [0.5;450];
maxub = [0.7;500];
surf4 = plot_surf_check('sigma_L', 'var_eps_r', param_est,minlb,maxub,...
param_fix,kalman_init,VarObs,index);
subplot(4,2,5)
minlb = [0.7;450];
maxub = [0.98;500];
surf5 = plot_surf_check('rho_a', 'var_eps_r', param_est,minlb,maxub,...
param_fix,kalman_init,VarObs,index);
subplot(4,2,6)
minlb = [2;450];
maxub = [2.5;500];
surf6 = plot_surf_check('kappa_y', 'var_eps_r', param_est,minlb,maxub,...
param_fix,kalman_init,VarObs,index);
subplot(4,2,7)
minlb = [0.01;450];
maxub = [0.1;500];
surf7 = plot_surf_check('kappa_pi', 'var_eps_r', param_est,minlb,maxub,...
param_fix,kalman_init,VarObs,index);
subplot(4,2,8)
minlb = [2;450];
maxub = [4.8;500];
surf8 = plot_surf_check('var_eps_a', 'var_eps_r', param_est,minlb,maxub,...
param_fix,kalman_init,VarObs,index);
Where plot_surf_check is a function does surfc by taking model parameters. The function returns a graphic handle.
My problem is, when I run the code, it gives me 8 figures, each one has only one plot on the corresponding subplot position without any graphics in it. I may miss something apparent here, any comments or help is much appreciated.
Cheers
Ben
0 commentaires
Réponse acceptée
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Subplots dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!