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

MATLAB FIG to PDF

  1. Jan 8, 2009 #1
    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.
     

    Attached Files:

  2. jcsd
  3. Jan 10, 2009 #2
    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).
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?



Similar Discussions: MATLAB FIG to PDF
  1. PDF plot (Replies: 3)

  2. Histogram and PDF (Replies: 0)

Loading...