Remove the margin of the plot
조회 수: 85 (최근 30일)
이전 댓글 표시
When extracting the plot, I want the plot to be tight to the boundaries. I am unable to do it.
Can you please help me.![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/323266/image.jpeg)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/323266/image.jpeg)
Thanks in advance
fig = gcf
fig.PaperUnits = 'inches';
fig.PaperPosition = [0 0 12 6];
%fig.Units = 'normalized';
%fig.Position=[0.13 0.11 0.77 0.34];
%fig.ActivePositionProperty = 'position';
fig.InvertHardcopy = 'off';
ylim([yli(1,1) yli(1,2)])%([MI MX+(MX-MI)*0.4])
xlim([10^-3 10^0])
saveas(gcf,'1.Across_semilog.png')
closereq
댓글 수: 0
답변 (1개)
Gaurav Aggarwal
2020년 6월 28일
Hi Saugat,
You can check KSSV's answer to a similar query here : https://www.mathworks.com/matlabcentral/answers/369399-removing-the-grey-margin-of-a-plot
It worked for me, hope it helps you too. Thanks.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Annotations에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!