3
$\begingroup$

I would like to export a Mathematica graph as PDF, then use Adobe Illustrator to manipulate it. So, I create the graph, and export it:

lSine = Table[{x, Sin[x]}, {x, 0, 2 Pi}];
g1 = ListPlot[lSine, Joined -> True,  PlotMarkers -> {"\[FilledUpTriangle]", 14}]
Export["plotMarkers.pdf", g1]

The graph looks like this in Mathematica:

enter image description here

However, when I open the PDF in illustrator, I get the following:

enter image description here

And the triangle markers have been replaced by a font called 'Myriad Pro', which looks terrible.

I would like to export the file in PDF format, but stop Illustrator from thinking that the markers are fonts. Does anyone know how to do this?

I have seen this question, which tackles the somewhat similar issue, but for an actual font. However, I can't see anything exactly analogous to this issue. Note: I could export the file as a JPG and avoid this issue, but I want to keep the PDF quality.

$\endgroup$
  • 2
    $\begingroup$ The default PlotMarkers are font glyphs. See (2216). Try adding "TextMode"->"Outlines" to Export and see if that solves it. Another, I would argue better, solution is to use non-glyph markers, e.g. (84857). $\endgroup$ – Mr.Wizard Mar 15 '16 at 23:33
  • $\begingroup$ @Mr.Wizard Thanks for your message. Using "TextMode"->"Outlines" didn't work, but using non-glyph markers did. Thanks very much! Best, Ben $\endgroup$ – ben18785 Mar 15 '16 at 23:41
8
$\begingroup$

By default plot markers are glyphs from a Mathematica font:

Graphics`PlotMarkers[]
{{"\[FilledCircle]", 8.96}, {"\[FilledSquare]", 8.96}, {"\[FilledDiamond]", 
  10.88}, {"\[FilledUpTriangle]", 10.24}, {"\[FilledDownTriangle]", 
  10.24}, {"\[EmptyCircle]", 10.24}, {"\[EmptySquare]", 10.24}, {"\[EmptyDiamond]", 
  10.24}, {"\[EmptyUpTriangle]", 11.136}, {"\[EmptyDownTriangle]", 11.136}}

Illustrator can't recognize this font and replaces it with a "similar" font during import. For producing publication-quality graphs it is highly recommended don't use glyph-based plot markers because Mathematica can't position them exactly. The best is to use primitive-based custom plot markers and there is a convenient package for this:

Another possibility is to define primitive-based plot markers yourself, for example as shown in this answer.

$\endgroup$
  • $\begingroup$ Thanks for your comment under my answer., now I remember I saw those posts before. +1 $\endgroup$ – Dr. belisarius Mar 16 '16 at 3:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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