2

I am trying to export an image in the following way:

p1 = Plot[Sin[x], {x, -3, 3}]
Export["sinx.jpeg", p1, ImageResolution -> 1200]

The exported image in this case extremely nice. enter image description here Where as in the following cases, it is weird!

p1 = Plot[Sin[x], {x, -3, 3}, PlotLegends -> {"sinx"}]
Export["sinx.jpeg", p1, ImageResolution -> 1200]

enter image description here How to obtain the same high resolution good quality image of the first case in the second one also along with legends?

Surprisingly in none of the exported images, tick marks are not visible where as in the copy&paste images they are visible!

Update: I am working on Version 10.0.2.0

Thank you.

1 Answers1

2

You have to define the ImageSize.

p1 = Plot[Sin[x], {x, -3, 3}, PlotLegends -> {"sinx"}, ImageSize -> 300]
Export["sinx.jpeg", p1, ImageResolution -> 1200]

enter image description here

I think by default MMA try to set the same imagesize to both the plot and the legend and combine them as a Graphics Grid.

Sumit
  • 15,912
  • 2
  • 31
  • 73