Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

I have over 2000 graphs. I would like to Export them, ideally, in one PDF document with all the graphs on it.

share|improve this question

closed as unclear what you're asking by Jens, Szabolcs, Yves Klett, halirutan, RunnyKine May 15 at 22:20

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question.If this question can be reworded to fit the rules in the help center, please edit the question.

You want to export them one by one? With what name? –  Öskå May 15 at 19:43
The best way would ,ideally, to be able to have one pdf document with all the graphs on it. Is this possible? –  user7954 May 15 at 19:46
I think I replicated the same thing, but my pdf is blank. –  user7954 May 15 at 20:42
Can size be an issue? It works perfectly fine on a small sample size. Can we adjust how many will fit on a pdf? –  user7954 May 15 at 20:49
You could save them out individually then use LaTeX to make a document with all the plots. You can even have Mathematica write your LaTeX document which will let you add comments about all of your parameters that were used to create all the plots. If you have sub groups of plots that go together you can use the animate package in LaTex to make some really nice results. –  c186282 May 15 at 21:28

2 Answers 2

This is arranging the plots on a grid:

 plotlist = 
    Plot[ #.{1, x, x^2, x^3} , {x, -1, 1}, ImageSize -> 180] & /@ 
      RandomReal[{-1, 1} , {2000, 4}];
 Export["test2000y.pdf", GraphicsGrid[Partition[#,
    Sequence @@ ConstantArray[Floor[.7  Sqrt[Length[#]]], 2],
       {1,1}, {}] &@ plotlist]]

( The .7 controls the grid aspect ratio ) This is a screen grab from acrobat:

enter image description here

zoom in and see we have good quality:

enter image description here

Note specifying ImageSize (per @Oska answer ) is essential otherwise the font sizes, line weights etc get buggered up.

share|improve this answer
  • All plots in one single page:

    lists = RandomReal[{0, 10}, {10, 10, 2}];
    labels = StringForm["Plot n° ``", #] & /@ ToString /@ Range@Length@lists
    plots = Column[
    ListPlot[#, Joined -> True, PlotMarkers -> Automatic, 
      ImageSize -> 180, PlotLabel -> #2] & @@@ Thread[{lists, labels}]]
    Export["~/Plots.pdf", plots]

    One PDF with 10 plots in it.

  • n plots per page:

    list = RandomReal[{0, 10}, {105, 10, 2}];
    labels = ToString@StringForm["Plot n° ``", #] & /@ ToString /@ Range@Length@list;
    numberPerPage = 10;
    parts = Partition[#, numberPerPage, numberPerPage, 1, {}] &;
    makeLP = ListPlot[#, Joined -> True, PlotMarkers -> Automatic, 
      ImageSize -> 180, PlotLabel -> #2] &;
    Print["You will get " <> ToString@Length@parts@list <> " pages."]
    pdfnames = ToString@StringForm["~/Plots``.pdf", #] & /@ 
      ToString /@ Range@Length@parts@list;
    ppp = Column[
      makeLP @@@ Thread[{(parts@list)[[#]], (parts@labels)[[#]]}]] & /@
    Export[#, #2] & @@@ Thread[{pdfnames, ppp}]

    11 PDFs with 10 plots per pages for the 10th firsts and 5 for the last one.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.