2
$\begingroup$

I'm trying to export a stream plot to an SVG grapic. I make the stream plot like this:

g = StreamPlot[{-x, y}, {x, -3, 3}, {y, -3, 3}]

Then export it like this

Export["stream.svg", g]

But the resulting image has large numbers along its sides:

enter image description here

Why are these so much larger than in the notebook?

$\endgroup$
6
  • 1
    $\begingroup$ I am not seeing this in v10.1 under Windows. What version and platform are you using, and what are you using to render the SVG file? $\endgroup$
    – Mr.Wizard
    Sep 12, 2017 at 15:15
  • $\begingroup$ I'm using 10.3.1.0 on macOS Sierra and rendering them in inkscape. Setting FrameTicks-> None, as recommended below, gets rid of the numbers, though it doesn't explain why the numbers are so much larger in the SVG than they are in the Mathematica notebook labels for the ticks $\endgroup$
    – Libby
    Sep 12, 2017 at 15:21
  • $\begingroup$ I can't reproduce the problem in Mma 11.1.1. $\endgroup$
    – rhermans
    Sep 12, 2017 at 15:23
  • $\begingroup$ Hmm maybe it's just my version then? Strange. $\endgroup$
    – Libby
    Sep 12, 2017 at 15:24
  • 2
    $\begingroup$ It's just a bug which is fixed in version 11.1. You're original question, namely how to work around it in a version where the bug is present, was more interesting. $\endgroup$ Sep 12, 2017 at 15:25

1 Answer 1

4
$\begingroup$

You can remove the numbers using FrameTicks -> None

g = StreamPlot[{-x, y}, {x, -3, 3}, {y, -3, 3}, FrameTicks -> None]

Export["stream.svg", g]

Mathematica graphics

But your problem seems to be that the numbers are oversized.


UPDATE The question was edited. Unfortunately I can't reproduce the problem in Mathematica 11.1.1. I suggest you have a play with the fonts.

g = StreamPlot[{-x, y}, {x, -3, 3}, {y, -3, 3}, 
  FrameTicks -> Automatic, 
  BaseStyle -> {FontSize -> 14, FontFamily -> "Helvetica", 
    FontTracking -> "Plain", TextJustification -> 0, 
    PrivateFontOptions -> {"OperatorSubstitution" -> False}}]

Code and plots done in Mathemathica 11.1.1 on Win7

$\endgroup$
4
  • $\begingroup$ Yes exactly. Thanks for the suggestion; this will allow me to do what I want. But it still doesn't answer why the numbers are so oversized. $\endgroup$
    – Libby
    Sep 12, 2017 at 15:21
  • $\begingroup$ @user51688 I know, but the question was "How can I get rid of these?" $\endgroup$
    – rhermans
    Sep 12, 2017 at 15:22
  • $\begingroup$ Edited for clarity :) $\endgroup$
    – Libby
    Sep 12, 2017 at 15:23
  • $\begingroup$ @user51688 Next time please think you question carefully. It's discouraging to have a moving target $\endgroup$
    – rhermans
    Sep 12, 2017 at 15:28

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.