Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[feature request] circle -> SVG <circle> #17424

Open
Labels
Difficulty: Hardhttps://matplotlib.org/devdocs/devel/contribute.html#good-first-issuesNew featurekeepItems to be ignored by the “Stale” Github Actiontopic: path handling
@nschloe

Description

@nschloe

When saving a scene as SVG, circles are translated to<path> elements. For example

importmatplotlib.pyplotaspltcirc=plt.Circle((0.0,0.0),1.0,alpha=0.5)plt.gca().add_patch(circ)plt.autoscale()plt.gca().set_aspect("equal")plt.gca().set_axis_off()# plt.show()plt.savefig("out.svg")
   <gid="patch_2">    <pathclip-path="url(#p50a8cc0149)"d="M 236.16 295.488.C 268.238967 295.488 299.008381 282.742891 321.691636 260.059636.C 344.374891 237.376381 357.12 206.606967 357.12 174.528.C 357.12 142.449033 344.374891 111.679619 321.691636 88.996364.C 299.008381 66.313109 268.238967 53.568 236.16 53.568.C 204.081033 53.568 173.311619 66.313109 150.628364 88.996364.C 127.945109 111.679619 115.2 142.449033 115.2 174.528.C 115.2 206.606967 127.945109 237.376381 150.628364 260.059636.C 173.311619 282.742891 204.081033 295.488 236.16 295.488.z"style="fill:#1f77b4;opacity:0.5;"/>   </g>

A better suited approach would be SVG's own<circle> element:

    <circlecx="236"cy="174.5"r="121"fill="red" />

Metadata

Metadata

Assignees

No one assigned

    Labels

    Difficulty: Hardhttps://matplotlib.org/devdocs/devel/contribute.html#good-first-issuesNew featurekeepItems to be ignored by the “Stale” Github Actiontopic: path handling

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp