It seems that creating publication-quality graphics with mma is a black art that dates back decades. Although things have much improved in recent years, it is still hard to get consistent results when exporting to files. The way the final result looks seems to be somewhat format-dependent (with EPS working best in my experience).
Quite often, the lines in frames and tick marks end up being too faint in the EPS file, and when trying to do something like FrameStyle->AbsoluteThickness[2]
, it is easy to get lines that are too thick. So, my current approach involves taking five parameters -- three line thicknesses (in FrameStyle, AxesStyle, and PlotStyle), ImageSize, and FontSize in BaseStyle -- and randomly tweaking them until the exported plot looks acceptable. This is somewhat unsatisfactory and time consuming.
Is there a better way and/or a standard prescription to follow in order to achieve balanced, good-looking plots?
Edit: here's one example. Looks good on screen (see screenshot), but export it into EPS and you'll probably see two things: (a) There's a bug with EPS font embedding: for me, the epsilon inside the figure doesn't embed properly unless I remove the FontWeight->Normal
directive. (b) The frame/tick lines are light-gray and 1 pixel thick. If I wanted to shrink this figure (e.g. to place it as an inset), it would trash the quality. However, using AbsoluteThickness[2]
looks bad -- so I have to increase ImageSize
. But then the fonts are too small and/or lines in the plot look too thin, etc, etc.
With[{exSubscript = "\[UpTee]", epsFontSize = 24,
xcoords = {0.63, 2.2}}, testInset = Style[Inset[Cell[TextData[Cell[
BoxData[FormBox[SubscriptBox["\[Epsilon]", exSubscript],
TraditionalForm]]]]], xcoords, {Left, Baseline}],
FontWeight -> Normal, FontSize -> epsFontSize];
];
Show[Plot[10 x^2, {x, 0, 1}, PlotStyle -> Thick, Frame -> True,
PlotRange -> {-2, 8}, Epilog -> {testInset}], Axes -> {True, True},
AxesOrigin -> {0, 0}, AxesStyle -> Dashed,
FrameLabel -> {"\[Lambda] [\[Mu]m]", "Re{\[Epsilon]}"},
BaseStyle -> {FontSize -> 22, FontWeight -> Plain,
FontFamily -> Helvetica}, ImageSize -> 500]
Export["test.eps", %]
Edit: Accepting Szabolcs' answer, but Mr.Wizard should be given credit for pointing out the FontFamily -> Helvetica
vs FontFamily -> "Helvetica"
behavior (which seems like a bug). Without the quotes, PDF export is a non-starter due to screwed-up fonts.