MATLAB Answers

Resize subplot to whole figure window

36 views (last 30 days)
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])

  0 Comments

Sign in to comment.

Accepted Answer

Stephane Dauvillier
Stephane Dauvillier on 9 May 2019
Try this one
subplot(1,1,1,gca)
It will transform the gca axe into a subplot(1,1,1) axes

  0 Comments

Sign in to comment.

More Answers (0)

Sign in to answer this question.

Products


Release

R2016b