Producing subplots and then combine them into a figure later in MATLAB

前端 未结 4 1016
感动是毒
感动是毒 2020-12-01 16:59

My program produces small figures during the command cycle. Is there a way to just save these figures and then combine them in one figure later?

4条回答
  •  無奈伤痛
    2020-12-01 17:38

    Amro's solution works greatly, but with boxplots you have to reset the Xtick and Xtick labels, otherwise, for some reason, they will not be resized according to the the subplot. When you create the boxplot or after opening the figure add:

    set(gca,'XTick',<1d vector>,'XTickLabel',<1d cell vector>)
    

    or put automatic ticks and labels

    set(gca,'XTickMode','auto','XTickLabelMode','auto')
    

提交回复
热议问题