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 want to export a plot which includes curve fitted to a multiple data set.

shortly ( I use autolegend function Here )

datpl = ListPlot[{Er[1], Er[2], Er[3], Er[4], Er[5], Er[6], Er[7], 
    Er[8], Er[9], Er[10], Er[11], Er[12], Er[13]}, 
   PlotStyle -> {Black, Red, Blue, Green, Pink, Yellow, Brown, Orange,
      Magenta, Gray, Cyan, Purple, Darker[Blue] }];
datap2 = ListPlot[{{Er[1][[#, 1]], U[#, 1] /. solmd[[2]]} & /@ 
     Ei[1][[All, 1]]}, Joined -> True, PlotRange -> {{2, 6}, All}, 
   Frame -> True, PlotStyle -> {Black}, Axes -> False];
datap3 = ListPlot[{{Er[2][[#, 1]], U[#, 2] /. solmd[[2]]} & /@ 
     Ei[2][[All, 1]]}, Joined -> True, PlotRange -> {{2, 6}, All}, 
   Frame -> True, PlotStyle -> {Red}, Axes -> False];
datap4 = ListPlot[{{Er[3][[#, 1]], U[#, 3] /. solmd[[2]]} & /@ 
     Ei[3][[All, 1]]}, Joined -> True, PlotRange -> {{2, 6}, All}, 
   Frame -> True, PlotStyle -> {Blue}, Axes -> False];
datap5 = ListPlot[{{Er[4][[#, 1]], U[#, 4] /. solmd[[2]]} & /@ 
     Ei[4][[All, 1]]}, Joined -> True, PlotRange -> {{2, 6}, All}, 
   Frame -> True, PlotStyle -> {Green}, Axes -> False];
datap6 = ListPlot[{{Er[5][[#, 1]], U[#, 5] /. solmd[[2]]} & /@ 
     Ei[5][[All, 1]]}, Joined -> True, PlotRange -> {{2, 6}, All}, 
   Frame -> True, PlotStyle -> {Pink}, Axes -> False];
datap7 = ListPlot[{{Er[6][[#, 1]], U[#, 6] /. solmd[[2]]} & /@ 
     Ei[6][[All, 1]]}, Joined -> True, PlotRange -> {{2, 6}, All}, 
   Frame -> True, PlotStyle -> {Yellow}, Axes -> False];
datap8 = ListPlot[{{Er[7][[#, 1]], U[#, 7] /. solmd[[2]]} & /@ 
     Ei[7][[All, 1]]}, Joined -> True, PlotRange -> {{2, 6}, All}, 
   Frame -> True, PlotStyle -> {Brown}, Axes -> False];
datap9 = ListPlot[{{Er[8][[#, 1]], U[#, 8] /. solmd[[2]]} & /@ 
     Ei[8][[All, 1]]}, Joined -> True, PlotRange -> {{2, 6}, All}, 
   Frame -> True, PlotStyle -> {Orange}, Axes -> False];
datap10 = 
  ListPlot[{{Er[9][[#, 1]], U[#, 9] /. solmd[[2]]} & /@ 
     Ei[9][[All, 1]]}, Joined -> True, PlotRange -> {{2, 6}, All}, 
   Frame -> True, PlotStyle -> {Magenta}, Axes -> False];
datap11 = 
  ListPlot[{{Er[10][[#, 1]], U[#, 10] /. solmd[[2]]} & /@ 
     Ei[10][[All, 1]]}, Joined -> True, PlotRange -> {{2, 6}, All}, 
   Frame -> True, PlotStyle -> {Gray}, Axes -> False];
datap12 = 
  ListPlot[{{Er[11][[#, 1]], U[#, 11] /. solmd[[2]]} & /@ 
     Ei[11][[All, 1]]}, Joined -> True, PlotRange -> {{2, 6}, All}, 
   Frame -> True, PlotStyle -> {Cyan}, Axes -> False];
datap13 = 
  ListPlot[{{Er[12][[#, 1]], U[#, 12] /. solmd[[2]]} & /@ 
     Ei[12][[All, 1]]}, Joined -> True, PlotRange -> {{2, 6}, All}, 
   Frame -> True, PlotStyle -> {Purple}, Axes -> False];
datap14 = 
  ListPlot[{{Er[13][[#, 1]], U[#, 13] /. solmd[[2]]} & /@ 
     Ei[13][[All, 1]]}, Joined -> True, PlotRange -> {{2, 6}, All}, 
   Frame -> True, PlotStyle -> {Darker[Blue]}, Axes -> False];
p = Show[datpl, datap2, datap3, datap4, datap5, datap6, datap6, 
   datap7, datap8, datap9, datap10, datap11, datap12, datap13, 
   datap14];
plot = autoLegend[
  p, {"A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", 
   "M"}, Background -> Directive[LightOrange, Opacity[.5]], 
  Alignment -> {Right, Top}]
Export["/Users/nazanin/Documents/thesis/results/plot.bmp", plot, 
 ImageSize -> 900]

but when I get my plot it looks pixelated, and also if I try to export as jpg it compress the picture hugely and my version of mathematica(8.04) seems not to understand the command "CompressionLevel" though it gives me no error.

my plot

share|improve this question
2  
Is that a minimal code sample displaying the problem? –  belisarius May 13 '13 at 14:01
1  
PNG (.png) is a better format for these things. Pixelated it will always be - if you export to a raster format. See also: mathematica.stackexchange.com/q/296/131. –  Yves Klett May 13 '13 at 14:02
    
You could first convert to a large bitmap size using Image and then scale back to the size you use here using ImageResize. In that way you'd create a bit of antialiasing removing some of the jaggedness. –  Sjoerd C. de Vries May 13 '13 at 14:07
2  
What Sjoerd suggests is done automatically by this palette. But for this type of plot exporting to a vector format will be better. –  Szabolcs May 13 '13 at 14:27
    
Why don't you export it to an EPS file? They do not have this pixelation problem as they are vector images. –  chipdelmal May 14 '13 at 17:45
add comment

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.