[Matplotlib-users] Spikes in small wedges of a pie chart

Torsten Bronger bronger at physik.rwth-aachen.de
Fri Jul 15 04:58:48 EDT 2016


Hallöchen!

http://wilson.bronger.org/software.svg exhibits ugly spikes in the
small wedges of this pie chart.  After importing the SVG into
Inkscape, the problem is even worse but can be fixed by changing the
style of line vertices to "rounded".

It may be a bug in the SVG-displaying software, however, maybe there
is a workaround?  I use Python3 + matplotlib 1.5.1.  The code is:

    from matplotlib import pyplot
    import matplotlib

    figure = pyplot.figure()
    axes = figure.gca()
    axes.pie([23, 22, 2, 42, 1, 34, 17, 21, 15, 290, 897],
             labels=["Fedora", "CKAN", "dLibra" + 8 * " ", "DSpace",
                     "eSciDoc", "DataVerse", "EPrints", "MySQL", "Nesstar",
                     "sonstige", "unbekannt"],
             explode=[0, 0, 0, 0, 0, 0, 0, 0, 0, 0.1, 0.15],
             wedgeprops={"clip_on": True, "capstyle": "round"},
             shadow=True, startangle=150)
    axes.set_aspect("equal")
    figure.savefig("software.svg", bbox_inches="tight", transparent=True)

Any help or workaround is appreciated.  Thank you!

Tschö,
Torsten.

-- 
Torsten Bronger    Jabber ID: torsten.bronger at jabber.rwth-aachen.de



More information about the Matplotlib-users mailing list