Resize subplot to whole figure window

조회 수: 16 (최근 30일)
Christopher Rock
Christopher Rock 2019년 5월 9일
답변: Stephane Dauvillier 2019년 5월 9일
I've plotted a figure as a subplot by mistake, and I want to move it to its own figure window without re-plotting it. When I set the OuterPosition to [0 0 1 1], the axes moves to a different position to if I'd just plotted it to a new figure, with less space at the right and bottom. How do I get the default position? (MATLAB 2016b)
subplot(1,2,1)
plot(1:5)
set(gca,'OuterPosition',[0 0 1 1])

채택된 답변

Stephane Dauvillier
Stephane Dauvillier 2019년 5월 9일
Try this one
subplot(1,1,1,gca)
It will transform the gca axe into a subplot(1,1,1) axes

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Subplots에 대해 자세히 알아보기

제품


릴리스

R2016b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by