Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

See this thread on sage-support, where I believe this question was asked and answered pretty completely. The short answer is that it is a tradeoff between sharp graphics and rounding by one pixel. To have fuzzier, but more correct graphics, do

import matplotlib
matplotlib.rcParams['path.snap'] = False

The arrow issue is a separate issue, since in Sage, arrows are automatically shortened by a bit. However, investigating this led to several bugfixes in arrows and this Sage trac ticket for making arrows more precise when those bugfixes to matplotlib are eventually included in Sage.

See this thread on sage-support, where I believe this question was asked and answered pretty completely. The short answer is that it is a tradeoff between sharp graphics and rounding by one pixel. pixel when you have raster graphics (like png). To have fuzzier, but more correct graphics, do

import matplotlib
matplotlib.rcParams['path.snap'] = False

If you have vector graphics (like pdf), this is not an issue.

The arrow issue is a separate issue, since in Sage, arrows are automatically shortened by a bit. However, investigating this led to several bugfixes in arrows and this Sage trac ticket for making arrows more precise when those bugfixes to matplotlib are eventually included in Sage.