Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Simple Matlab Graphics Question

  1. Jan 19, 2012 #1
    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


    do more stuff

    do other stuff


    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])


    figure(1,[0 0 1680 1050])

    obviously returns the error
    ??? Error using ==> figure
    Too many input arguments.
  2. jcsd
  3. Jan 19, 2012 #2
    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 :-)
  4. Jan 19, 2012 #3

    Dr Transport

    User Avatar
    Science Advisor
    Gold Member

Share this great discussion with others via Reddit, Google+, Twitter, or Facebook