Removing deadspace in subplots while retaining title & labels

前端 未结 5 1940
滥情空心
滥情空心 2021-01-03 04:08

Hi I have a problem in matlab I want to create a figure containing 10 subplots. in 2X5 orientation. But the problem is that I want to reduce the deadspace area between them

5条回答
  •  难免孤独
    2021-01-03 05:01

    Of course it can be done with a single loop (using a cell array for your variables, and one for the plotting functions ) but for simplicity i would just lump it as two loops .

    labels = {'(a)' , '(n)' , '(etc)' , 'asdf','asddf'}
    jay=1
    for aye =1:5
         subplot('Position',[0.025+0.19*(aye-1) 0.51-0.48*(jay-1)  0.19 0.48]);
        ...
         h=xlabel(labelsabc{aye},'FontSize',12);
         ....
    end
    

提交回复
热议问题