Saving MATLAB Figures as PDFs: Issues & Solutions

  • Context: MATLAB 
  • Thread starter Thread starter NoobixCube
  • Start date Start date
  • Tags Tags
    Issues Matlab
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
1 reply · 30K views
NoobixCube
Messages
154
Reaction score
0
Hey all,
after producing a fig. with matlab, I save it as a PDF. But upon opening the pdf it seems to cut the fig to a portrait page, when the figure is actually a landscape image. Any ideas?
For an idea of what's going on, see the attached file.
 

Attachments

Physics news on Phys.org
Yeah don't ever use matlab's save as "pdf", it's terrible.
Two things if you are still going to do it this way:
-When you save as .pdf, the image will be produced according to the window size of your figure
-Look at your graph's, notice how they're rugged and "jaggedy"? That's a flaw of matlab.

I know you're attaching these figures in a document so here's something you should definitely do:
Go into matlab.
Create a new script file.
Place the following commands in it:

format long
format compact
set(0, 'defaultFigurePaperType', 'A4')
set(0, 'defaultFigurePaperUnits', 'centimeters')
set(0, 'defaultFigurePaperPositionMode', 'auto')

Save the file as startup.m and save in directory:
...\Matlab\Toolbox\Local\
Now everytime Matlab starts and you produce a figure, it will scale the window and any saved file to an A4 standard where you can fit upto 2 figures on a page. (save as EPS always, and convert to pdf).