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 need to export some (2D) graphs from mathematica in eps format (only, unfortunately). The graphs are of similar nature (plotted from our different functions), and I have used the PlotRange option to make all the graphs of equal size (in both x and y direction). However, while exporting, we get the exported files of slightly unequal size. This creates a problem while putting in some document, as when we scale it to the same size, the font size looks different (which, needless to say are same for everyone). I tried to use the ImageSize option, but definitely I am making some mistakes, as I am not getting the graphics ( or to be precise getting a small part of the graphics). So my question is, what is the best way to export all of them in a fixed size, say of 5cm x 4cm?

I use version 7. Advanced thanks for any help.

share|improve this question
1  
I think the answer is also ImageSize: Export["test.eps", Plot[Sin[x], {x, 0, 1}, ImageSize -> 200]] –  chris Nov 8 '12 at 8:32
    
and I forgot to say you can specify e.g. Imagesize->{250,200} –  chris Nov 8 '12 at 9:10
    
@chris ImageSize->{GoldenRatio*200,200} or any size in agreement with the AspectRatio specification might be even better to avoid the useless white border around the graph. –  VLC Nov 8 '12 at 9:26
    
You wrote that you tried ImageSize and you use the same PlotRange. What can still change the appearance of the plots are different Labels on the Axes/Frame (since ImageSize is the size of the whole Plot not just the plot area). Also let me add this: If you want the picture to be 5cm wide the right ImageSize to use should be 5*72/2.54. Then you can set up the font size to whatever size you want (e.g. 10pt) and use the graphic without scaling. –  jenson Nov 8 '12 at 9:59
    
thanks to all. it worked. –  RSG Nov 8 '12 at 11:41
add comment

1 Answer

up vote 3 down vote accepted

To summarize all contributions,

Export["test.eps", Plot[Sin[x], {x, 0, 1},ImageSize -> 5*72/2.54*{GoldenRatio,1},
BaseStyle -> {FontSize -> 10, FontFamily -> "Helvetica"}]]

should produce a magnificent postscript file of the right size ;-)

it is truly magnificent

share|improve this answer
    
you can also add: BaseStyle -> {FontSize -> 10, FontFamily -> "Helvetica"} to get a sans-serif font in a size that matches the rest of your document. –  jenson Nov 8 '12 at 18:46
add comment

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.