Clear Filters
Clear Filters

Change de default position of plot

211 views (last 30 days)
Dear;
This a silly question
Sometimes when I debug a program I need to plot some of the variables in different figures
The figure apear just in the middle of the script editor, so to continued debugging I have to move the plot
Is there any way to chage the default position where the plot appears?
Many thanks,
  1 Comment
Geoff Hayes
Geoff Hayes on 19 May 2020
Luis - I think that in order to set the position of where the plot appears, you would need to create the figure first and set its position before calling plot
figure('Position',[0 0 100 100]); plot(1:42,42:-1:1)
See figure position property for more details.

Sign in to comment.

Accepted Answer

Walter Roberson
Walter Roberson on 19 May 2020
set(groot, 'DefaultFigurePosition', [x, y, width, height])
  1 Comment
Marc Compere
Marc Compere on 30 Apr 2024
Edited: Marc Compere on 30 Apr 2024
to get DefaultFigurePosition use:
left_bottom_width_height = get(groot, 'DefaultFigurePosition')
to set DefaultFigurePosition:
set(groot, 'DefaultFigurePosition', [left, bottom, width, height])

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!