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

Rasterizing patch changes filling of hatches in pdf backend #6228

Closed
@claria

Description

@claria

I want to plot a patch with the '*' hatch that is filled. The hatch is always filled when using
the agg backend but in the pdf backend only when it is rasterized.

As the legend artists do not use the rasterized prop (correct?), it is inconsistent.

mpl: 1.5.1, python 3.5.1, arch linux

Code to reproduce:

import matplotlibimport matplotlib.pyplot as pltfig = plt.figure()ax = fig.add_subplot(111)# patch without hatchingpatch1 = matplotlib.patches.Rectangle((0.5, 0.5), 1., 1., color='red', fill=False, hatch='*', label='patch1')# patch with hatchingpatch2 = matplotlib.patches.Rectangle((2.0, 0.5), 1., 1., color='blue', fill=False, hatch='*', rasterized=True, label='patch2')ax.add_patch(patch1)ax.add_patch(patch2)ax.set_xlim(0., 3.5)ax.set_ylim(0., 3)ax.legend()fig.savefig('asdf.png')fig.savefig('asdf.pdf')

PNG output:

asdf

PDF output:

asdf pdf

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp