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 following code:

  Table[LogLogPlot[
    a + 0.017*k + (-0.014*k)*Tanh[(k - 0.25)*b], {k, 0.1, 10}],
      {b, {0.1, 0.2, 0.3, 0.4}}, {a, {1.0, 1.1, 1.2, 1.3}}]

I get then a table of plots and I can click on each of them to save them. But how do I save them all at once into a single PDF?

If I instead do:

   GraphicsGrid[
     Table[LogLogPlot[
       a + 0.017*k + (-0.014*k)*Tanh[(k - 0.25)*b], {k, 0.1, 10}],
         {b, {0.1, 0.2, 0.3, 0.4}}, {a, {1.0, 1.1, 1.2, 1.3}}]]

I cannot right click on the figure to save as some image, but rather have to export it. And I am really not satisfied by the result.

Export["grid1", %, "PDF"]

All axes and fonts are completely squeezed, big and unreadable.

plot

How do I set borders and fonts and all that in an easy manner?

The best way would be really being able to right click on the table of plots and save it as it looks like.

share|improve this question
    
You can Rasterize the grid and export that if you do not need vector graphics. –  Yves Klett Feb 27 '13 at 16:00
1  
If you provide an ImageSize option to GraphicsGrid, it outputs at a more controllable size. But Export is not much different from Save As... –  cormullion Feb 27 '13 at 16:04
2  
You can right-click on the cell bracket. A menu will appear with "Save Selection As" among the options. You can then save it as PDF. (v.9) –  David Carraher Feb 27 '13 at 16:05
    
@David you should make that an answer; it's the method I would use. –  Mr.Wizard Feb 27 '13 at 16:19

2 Answers 2

up vote 6 down vote accepted

Yes, it's a bit frustrating to click on the output and not see an option to save to disk. Fortunately, you can right-click on the cell bracket and Save Selection As a PDF file.

Set the image size by hand before saving, or use the ImageSize setting, as suggested by @cormullion.

share|improve this answer
    
Yes I also found that by putting the cursor just after the GraphicsGrid plot, and then selecting the plot with Shift+Back Arrow, I get the usual orange box. Then right clicking on the orange line, gives me the option Save Graphic As... –  Santi Feb 27 '13 at 16:50
    
The key thing appears to be to highlight the output before right-clicking. –  David Carraher Feb 27 '13 at 18:46

Since you mentioned squished axes values when using GraphicsGrid, you can use a combination of ImageSize and BaseStyle--along numerous options to tweak plots and graphics, more info here--within LogLogPlot to achieve the look you want (I haven't experimented with it much but I found font size at 1/20 of image size looks decent). You can also specify the overall size of the final image by using another ImageSize within GraphicsGrid.

size = 100;
grid1 = GraphicsGrid[
  Table[LogLogPlot[
    a + 0.017 k - (0.014 k) Tanh[(k - 0.25) b], {k, 0.1, 10},
    ImageSize -> size, BaseStyle -> {FontSize -> size/20.}],
   {b, {0.1, 0.2, 0.3, 0.4}}, {a, {1.0, 1.1, 1.2, 1.3}}]]
Export["grid1.pdf", grid1];

Mathematica graphics

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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