Skip to content

Spikes in small wedges of a pie chart #6828

@bronger

Description

@bronger

The following applies to Python3 + matplotlib 1.5.1.

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".

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Difficulty: Easyhttps://matplotlib.org/devdocs/devel/contribute.html#good-first-issuesbackend: svg

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions