I am having difficulties exporting EPS figures. If I use the LineLegend option to create a dashed or a dot-dashed line, it seems ok in Mathematica 9.0 e.g.:
But the problem came out when the figure was expoted to EPS e.g.,
I use the following Mathematica code
G1 = ListPlot[{
Table[{(i - 1) h, ρf[u, (i - 1) h, RKuOm, FB][[4, 4]]}, {i, 1, n - 1}],
Table[{(i - 1) h, ρf[u, (i - 1) h, RKuOm, FB][[3, 3]]}, {i, 1, n - 1}],
Table[{(i - 1) h, ρf[u, (i - 1) h, RKuOm, FB][[2, 2]]}, {i, 1, n - 1}]
},
PlotRange -> All, MaxPlotPoints -> Infinity, Joined -> True,
PlotLegends -> Placed[LineLegend[{Directive[Purple, Thickness[0.14]],
Directive[Blue, Thickness[0.14], Dashed], Directive[Red, Thickness[0.14],
DotDashed]}, {Style["\!\(\*SubscriptBox[\(ρ\), \(44\)]\)", 22, Bold],
Style["\!\(\*SubscriptBox[\(ρ\), \(33\)]\)", 22, Bold],
Style["\!\(\*SubscriptBox[\(ρ\), \(22\)]\)", 22, Bold]},
LegendMarkerSize -> {{35, 8}}], {{0.82, 0.4}}], AspectRatio -> 0.8,
PlotStyle -> {{Purple, Thickness[0.012]}, {Blue, Thickness[0.014],
Dashed}, {Red, Thickness[0.013], DotDashed}}, Frame -> True,
FrameStyle -> Directive[Thick, 15],
FrameLabel -> {Style["\!\(\*SubscriptBox[\(ω\), \(1\)]\)t", 18], None},
Epilog -> {Inset[Style["(a)", 24, FontFamily -> "Times", Bold], {6, 0.95}],
Inset[Style["G=0.1", 24, FontFamily -> "Times", Bold], {41.5, 0.61}]}]
Export["D:\\fermion.eps",G1,"EPS"];`
So, my question: why the style of the lines change? And how to solve?
Many thanks in advance.
Import
to Mathematica, is the problem there, or is it with some external viewer? $\endgroup$Dashing
orAbsoluteDashing
and playing with the dash lengths. $\endgroup$Table::iterb : Iterator {i, 1, -1 + n} does not have appropriate bounds.
What isn
? $\endgroup$AbsoluteDashing
which is exactly the answer given by george2079. In addition, if the thickness of the lines are changed e.g.,Thickness[a]
(a<0.01), I fond that I can use the posted code to export a normal EPS image, at least the dashed or the dotdashed lines would not turn into a straight line. $\endgroup$AbsoluteDashing
is very usefull. $\endgroup$