3
$\begingroup$

I am using Mathematica 11.0 under Linux.

I want to export some plots in PNG format, with resolution higher than the notebook display resolution.

When I evaluate

Export["filename.png", Magnify[plot, 2],"PNG"]

this gives me a good resolution, but the frame ticks from the plots are gone after magnification. I want the output in PNG format as I might need this figures later to assemble with other existing figures as an inset.

Is there a smarter way to improve the image resolution?

I have tried increasing ImageSize, but it does not help. Also, I have tried setting ImageResoltion up to 2500, but that does not help either.

Update

When I make a plot (say a list plot), I always use Frame-> True and FrameTicks -> Automatic. The frame ticks are visible when I export the plot as PNG without any magnification. However, the frame ticks are not visible when I use

Export["filename.png", Magnify[plot, 2],"PNG"]
$\endgroup$
13
  • $\begingroup$ I have no issues with your code. $\endgroup$
    – corey979
    Commented Dec 13, 2016 at 22:47
  • $\begingroup$ I know that you do not have issues with my code, but that is not my question. $\endgroup$
    – PythonNoob
    Commented Dec 13, 2016 at 22:57
  • $\begingroup$ In that case I have no idea what is your question. You say "frame ticks are gone", but I don't replicate this. $\endgroup$
    – corey979
    Commented Dec 13, 2016 at 23:02
  • $\begingroup$ When I make a plot (say ListPlot), I always use "Frame-> True" and "FrameTicks-> Automatic". These FrameTicks are visible if you export the plot as "PNG" without any magnification. However, the frame ticks are not visible when I use Export["filename.png", Magnify[plot, 2],"PNG"] $\endgroup$
    – PythonNoob
    Commented Dec 13, 2016 at 23:10
  • 3
    $\begingroup$ I'm voting to close this question as off-topic because with the information provided the issue cannot be reproduced. $\endgroup$
    – corey979
    Commented Dec 13, 2016 at 23:15

1 Answer 1

3
$\begingroup$

The issue is real, but has nothing to do with Export. It is a problem with Magnification alone. Running V11.0.1 on OS X, I can reproduce the problem in my note book as follows:

 plot = Plot[Sin[x], {x, 0, 2 π}, Frame -> True]

Then

 Style[plot, Magnification -> 2]

screen

The frame ticks are not magnified along with the rest of plot. I consider this a bug.

$\endgroup$
1
  • $\begingroup$ Thanks a lot; Yes, I guess its a magnification issue. However, in my case I do not see frame ticks at all (after exporting the magnified image) when I open the "PNG" in softwares like "gwenview". Anyways, the problem still persists. I need a high resolution plots in "PNG", which seems like an impossible task with Linux supporting Mathematica 11.0. $\endgroup$
    – PythonNoob
    Commented Dec 13, 2016 at 23:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.