Looks like you need to configure the SVG 'backend':
The matplotlib frontend or matplotlib API is the set of classes that
do the heavy lifting, creating and managing figures, text, lines,
plots and so on (Artist tutorial). This is an abstract interface that
knows nothing about output. The backends are device-dependent drawing
devices, aka renderers, that transform the frontend representation to
hardcopy or a display device (What is a backend?). Example backends:
PS creates PostScript® hardcopy, SVG creates Scalable Vector Graphics
hardcopy,...
> # The default backend; one of GTK GTKAgg GTKCairo GTK3Agg GTK3Cairo
> # CocoaAgg MacOSX Qt4Agg Qt5Agg TkAgg WX WXAgg Agg Cairo GDK PS PDF SVG
> # Template.
> # You can also deploy your own backend outside of matplotlib by
> # referring to the module name (which must be in the PYTHONPATH) as
> # 'module://my_backend'. backend : qt4agg
Src: http://matplotlib.org/Matplotlib.pdf