When my nice looking DiscretePlot
results are exported as PDF, they look very different from the original plots. For example, my original plot in Mathematica looks like
When this is exported as PDF, I have
Is there anyway I can export my plots exactly as they look?
EDIT
My model is a discrete dynamic model consisted of around ten variables and ten equations. So I used DiscretePlot
, not Plot
.
My code is:
a1 = 0.85;
a2 = 0.25;
L1 = 0.07;
L2 = 0.3;
w = 2;
b1 = 1;
b2 = 0.2;
x1[0] = 1;
x2[0] = 1;
p1[0] = 0.5;
p2[0] = 0.2;
mul0 = 0.9
mul1 = 3.9
mul2 = 2.8
H[0] = 1
r[0] = 0.1
x1[t_] := x1[t] = G*x1[t - 1];
x2[t_] := x2[t] = G*x2[t - 1];
mul[t_] := mul[t] = mul0 + mul1*r[t - 1] + mul2*(G - 1)
H[t_] := H[t] = H[t - 1]*G
m[t_] := m[t] = (mul[t]*H[t])/(L1*x1[t] + L2*x2[t])
exp[t_] := exp[t] = (m[t] - p2[t - 1]*w)/(p2[t - 1]*w)
r[t_] := r[t] = (exp[t]*(p2[t - 1]*w*L1*x1[t] +
p2[t - 1]*w*L2*x2[t]))/((p1[t - 1]*a1 + p2[t - 1]*w*L1)*
x1[t] + (p1[t - 1]*a2 + p2[t - 1]*w*L2)*x2[t])
p1[t_] := p1[t] = (1 + r[t])*(p1[t - 1]*a1 + p2[t - 1]*w*L1)
p2[t_] := p2[t] = (1 + r[t])*(p1[t - 1]*a2 + p2[t - 1]*w*L2)
check[t_] := check[t] = (x1[t] - a1 x1[t] - a2 x2[t])*p1[t] +
x2[t]*p2[t] -m[t]*(L1*x1[t] + L2*x2[t])
n1 = 1;
n2 = 200
Plot3 = Show[GraphicsRow[{DiscretePlot[p1[t], {t, n1, n2},
PlotLabel -> "Price 1", BaseStyle -> {FontSize -> 10},
PlotRange -> {{n1, n2}, {0, 10}}, Filling -> None,
Joined -> True],
DiscretePlot[v1[t], {t, n1, n2}, PlotLabel -> "Price 2",
BaseStyle -> {FontSize -> 10}, PlotRange -> {{n1, n2}, {0, 5}},
Filling -> None, Joined -> True],
DiscretePlot[check[t], {t, n1, n2}, PlotLabel -> "check",
BaseStyle -> {FontSize -> 10}, PlotRange -> {{n1, n2}, {0, 10}},
Filling -> None, Joined -> True]}], ImageSize -> Full]
Export["Plot3.pdf", Plot3];
Rasterize
at suitable resolution and export inPNG
or similar lossless bitmap format. Related: mathematica.stackexchange.com/a/750/131 $\endgroup$