3

I am creating some figures in MATLAB and I have a command that I run that coverts them to .eps after the figure is created.

However, I want the figures to be maximized before they are saved to .eps. I am looking for a command that tells MATLAB to resize the figure to the screen size. Then I want to run my function which saves to a .eps.

Is there such a way?

I have heard it may be possible to specify the pixel widths of the figure. I forgot that command, so if you know it, that would be helpful.

What I really want is some type of maximize_figure() function if possible.

madth3
  • 7,275
  • 12
  • 50
  • 74
Veridian
  • 3,531
  • 12
  • 46
  • 80
  • Why do you care whether the figure window is maximized when you're not converting to a raster format? – user57368 Aug 06 '13 at 19:25
  • @horchler, yes duplicate I guess. Sorry. I don't know what to do now. Delete this question? I couldn't find the one you linked me to before I created this question, even though I searched. – Veridian Aug 06 '13 at 20:30

1 Answers1

11

When opening a new figure, you can pass arguments to the figure function:

figure('units','normalized','outerposition',[0 0 1 1])

A full list of figure properties is also available here.

BenMorel
  • 34,448
  • 50
  • 182
  • 322
Doresoom
  • 7,398
  • 14
  • 47
  • 61
  • Hmm, I had this in my code and it seems to stop working for some reason. Once I restarted MATLAB it started working again. Any idea what would cause this? By not working I mean that the window would not open maximized. – Veridian Aug 06 '13 at 20:29
  • You don't have a variable named 'figure', do you? – Doresoom Aug 07 '13 at 11:48