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.

When we merge some colorful plots to a single image, with the command GraphicsGrid, the quality of output image will be lost, slightly. That is, for instance all bright colors will darken and the fonts will be blurred. How can this problem be fixed? Is there any other commands to merge some plots (mathematical ones) to a single image without losing the quality?

Please run the following commands

m := 1
n := -1
Subscript[Ω, 0] := 0.33
cn := (1 - (1 - m)*Subscript[Ω, 0])/(
 1 - Sqrt[24] n (B)^(3/2))
v[N_] := (E^(3 N) f[N])^-(1 + 1)
f[N_] := (B + (1 - B)*E^(-6*N))^(1/2)
qnp := -1 + (
  3 (2 (1 - B) cn v[N] (1 + (Sqrt[6] B^(3/2) n)/f[N]^(3/2)) f[N] + 
     E^(-3 N) (2 - (E^N)^(3/2) m) Subscript[Ω, 0]))/(
  4 (cn (1 - (2 Sqrt[6] B^(3/2) n)/f[N]^(3/2)) f[N] + 
     E^(-3 N) (1 - (E^N)^(3/2) m) Subscript[Ω, 0]))
SetOptions[Plot, Frame -> True, Axes -> {False, False}, 
  FrameStyle -> Directive[Black, 20, Bold], PlotRange -> {0.6, -1.1}, 
  ImageSize -> 400, 
  FrameLabel -> {Style[N, FontSize -> 20, Bold], 
    Style["q", FontSize -> 20, Bold]}];
P16 := Plot[Evaluate[qnp /. B -> 0], {N, -3, 3}, 
  PlotStyle -> {Thick, Dashing[{0.03, 0.01}], Brown}]
P26 := Plot[Evaluate[qnp /. B -> 0.33], {N, -3, 3}, 
  PlotStyle -> {Dotted, Blue, Thick}]
P36 := Plot[Evaluate[qnp /. B -> 0.66], {N, -3, 3}, 
  PlotStyle -> {DotDashed, Red, Thick}]
P46 := Plot[Evaluate[qnp /. B -> 0.99], {N, -3, 3}, 
  PlotStyle -> {Thick, Black}]
Co16 := Graphics[
  Text[Style["m=1", FontSize -> 13, Bold], {2.35, 0.31}]]
Co26 := Graphics[
  Text[Style["\!\(\*SuperscriptBox[\(n\), \((I)\)]\)=-1", 
    FontSize -> 13, Bold], {2.5, 0.18}]]
L56 := Graphics[{Thick, Black, Line[{{1.95, 0.1}, {2.95, 0.1}}]}]
L66 := Graphics[{Thick, Black, Line[{{2.95, 0.1}, {2.95, 0.4}}]}]
L76 := Graphics[{Thick, Black, Line[{{2.95, 0.4}, {1.95, 0.4}}]}]
L86 := Graphics[{Thick, Black, Line[{{1.95, 0.1}, {1.95, 0.4}}]}]
Sh1 = Show[P16, P26, P36, P46, Co16, Co26, L56, L66, L76, L86]

m := -1
n := -1
Subscript[Ω, 0] := 0.33
cn := (1 - (1 - m)*Subscript[Ω, 0])/(
 1 - Sqrt[24] n (B)^(3/2))
v[N_] := (E^(3 N) f[N])^-(1 + 1)
f[N_] := (B + (1 - B)*E^(-6*N))^(1/2)
qnp := -1 + (
  3 (2 (1 - B) cn v[N] (1 + (Sqrt[6] B^(3/2) n)/f[N]^(3/2)) f[N] + 
     E^(-3 N) (2 - (E^N)^(3/2) m) Subscript[Ω, 0]))/(
  4 (cn (1 - (2 Sqrt[6] B^(3/2) n)/f[N]^(3/2)) f[N] + 
     E^(-3 N) (1 - (E^N)^(3/2) m) Subscript[Ω, 0]))
SetOptions[Plot, Frame -> True, Axes -> {False, False}, 
  FrameStyle -> Directive[Black, 20, Bold], PlotRange -> {0.6, -1.1}, 
  ImageSize -> 400, 
  FrameLabel -> {Style[N, FontSize -> 20, Bold], 
    Style["q", FontSize -> 20, Bold]}];
P16 := Plot[Evaluate[qnp /. B -> 0], {N, -3, 3}, 
  PlotStyle -> {Thick, Dashing[{0.03, 0.01}], Brown}]
P26 := Plot[Evaluate[qnp /. B -> 0.33], {N, -3, 3}, 
  PlotStyle -> {Dotted, Blue, Thick}]
P36 := Plot[Evaluate[qnp /. B -> 0.66], {N, -3, 3}, 
  PlotStyle -> {DotDashed, Red, Thick}]
P46 := Plot[Evaluate[qnp /. B -> 0.99], {N, -3, 3}, 
  PlotStyle -> {Thick, Black}]
Co16 := Graphics[
  Text[Style["m=-1", FontSize -> 13, Bold], {2.44, 0.31}]]
Co26 := Graphics[
  Text[Style["\!\(\*SuperscriptBox[\(n\), \((I)\)]\)=-1", 
    FontSize -> 13, Bold], {2.5, 0.18}]]
L56 := Graphics[{Thick, Black, Line[{{1.9, 0.1}, {2.95, 0.1}}]}]
L66 := Graphics[{Thick, Black, Line[{{2.95, 0.1}, {2.95, 0.4}}]}]
L76 := Graphics[{Thick, Black, Line[{{2.95, 0.4}, {1.9, 0.4}}]}]
L86 := Graphics[{Thick, Black, Line[{{1.9, 0.1}, {1.9, 0.4}}]}]
Sh2 = Show[P16, P26, P36, P46, Co16, Co26, L56, L66, L76, L86]

GR := GraphicsGrid[{{Sh1, Sh2}}, Frame -> True, 
  FrameStyle -> Directive[Thick]]

Import[Export["fig1.jpg", GR]]
share|improve this question
2  
It is better to post minimal working examples. Doing this often helps in answering the question yourself. E.g. Compare the outputs of Import[Export["test.jpg", Plot[Sin[x], {x, 0, 9}]]] and Import[Export["test.png", Plot[Sin[x], {x, 0, 9}]]]. –  MikeLimaOscar Jun 6 at 10:37
    
Your problem is export to a lossy format, not GrapicsGrid. –  Yves Klett Jun 6 at 23:14

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.