Adjusting size of plot in Matlab so that graph does not get cut off by edge of plot window

前端 未结 3 2170
北海茫月
北海茫月 2021-01-07 03:26

I\'ve created a plot in Matlab, but unfortunately the side of the plot is cut off by the plotting window. Here is the code that I\'ve used to create the plot:



        
3条回答
  •  长情又很酷
    2021-01-07 04:06

    Try to set the OuterPosition of the plot.

    set(gca,'OuterPosition',[0.2 0.2 0.8 0.4]);
    

    The image below shows the difference between the two:

    enter image description here

    Here is the relevant MathWorks help page.

提交回复
热议问题