Message Boards Message Boards

Create plots that don't change when converting to pdf?

Posted 8 years ago

I'm currently using Mathematica 9 on Windows 8, and my problem is that every time I create a plot, it looks fine when I put it into a PowerPoint or Word document on my computer, but when I try to convert the entire document to a pdf or send the document to someone else, each of the individual points on my plots gets distorted. I've tried both copying and pasting the plots directly, and saving the graphic from Mathematica as each of the different available file formats which can then be inserted into Word or PowerPoint, and nothing seems to fix this problem. Thanks!

POSTED BY: Jane F
3 Replies
Posted 8 years ago

Thank you for sharing! Unfortunately the problem still persists in versions 9 and 10 (including the latest release 10.4.1) what you can check using the example from this answer:

http://mathematica.stackexchange.com/a/38776/280

POSTED BY: Alexey Popkov

The problem is caused by the rendering system, I once asked about this and here are some details:

I can confirm certain graphics primitives are rounded to integer coordinates when drawn to the screen. I can't really go into all the details about why this is done. You have produced an example which looks a little weird do to this behavior, but there are other examples which would look weird if we didn't do this. As you discovered, printing and vector export have no such issues. Polygon[] does not have this behavior. Also, further changes to improve consistency (particularly between different platforms) have been made for a future release of Mathematica. As for the feature in Mathematica 7 you mention, that basically involved converting our entire rendering subsystem from using fixed point coordinates to floating point coordinates. Previously internal coordinates were represented as integers in units of 1/16 of a point. This made the math nice and fast (particularly 20 years ago), but had the severe limitation that coordinates closer than 1/16 of a point were treated as if they were identical. This problem was exacerbated by the introduction of GeometricTransformation, for example, which caused the minor rounding errors to be magnified in certain circumstances and cause noticeable rendering errors.

Note that this was an email from august 2010, and the details might have changed again. To avoid it, always use Export["figure.pdf",%] for saving your plots!

POSTED BY: Sander Huisman
Posted 8 years ago

Which method of converting to PDF and what Mathematica version do you use?

In versions 9 and 10 there is a known bug when producing PDF files using "Save As...", "Save Selection As..." and "Save Graphic As..." menu items. The workaround is to use Export instead of menu items.

Additionally, if you use glyphs-based PlotMarkers, this thread is relevant. The workaround is to use primitive-based PlotMarkers.

POSTED BY: Alexey Popkov
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract