MATLAB Simple Matlab Graphics Question

  • Thread starter Thread starter Raging Dragon
  • Start date Start date
  • Tags Tags
    Graphics Matlab
AI Thread Summary
The discussion revolves around automating the process of saving multiple graphs generated in a loop, specifically focusing on maximizing the figure window and naming the figures iteratively. The user seeks a solution to set the figure size to fullscreen while avoiding errors related to input arguments in the figure function. A proposed solution involves using the 'ScreenSize' property to set the default figure size before plotting, ensuring that all generated figures are maximized. This approach allows for efficient handling of multiple figures without manual intervention in naming and saving them. The user references an old thread for additional context but finds it lacking in addressing their specific needs.
Raging Dragon
Messages
5
Reaction score
0
I have a for loop spitting out 60 graphs that I have to save to a file. I have to rename them anyways, so saving them by hand is not the issue. I'm wanting know how to maximize the screen and iteratively name the figures.

i.e. my code looks like

for i = 1:30

(stuff)

figure(i)
do more stuff

figure(100*i)
do other stuff

end

I came across this old thread https://www.physicsforums.com/showthread.php?t=187887 which was helpful, but doesn't fully answer what I want to do because:

figure(1,'Position',[0 0 1680 1050])

or

figure(1,[0 0 1680 1050])

obviously returns the error
? Error using ==> figure
Too many input arguments.
 
Physics news on Phys.org
If you do something like

fullscreen = get(0,'ScreenSize');
set(0, 'DefaultFigurePosition', [0 -50 fullscreen(3) fullscreen(4)])

before plotting anything then it will set the default size for new figures to be maximised.

Hope that helps :-)
 
http://www.mathworks.com/matlabcentral/newsreader/view_thread/285121
 

Similar threads

Replies
4
Views
1K
Replies
1
Views
2K
Replies
4
Views
2K
Replies
1
Views
2K
Back
Top