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

[Bug]: Hatch lines partially rendered by pgf backend when data exceed axes limits. #28496

Open
@NotDrJeff

Description

@NotDrJeff

Bug summary

Compare Issue#15491.
The pgf backend fails to render hatching properly (sometimes absent, sometimes partial) when the axes limits are set. Exact conditions depend on dataset and limits chosen. Hatching is rendered correctly in QtAgg backend.

Code for reproduction

importnumpyasnpimportmatplotlibasmplmpl.use('pgf')importmatplotlib.pyplotaspltx=y=np.arange(10)plt.plot(x,y)plt.fill_between(x,y,facecolor="none",hatch="X",linewidth=0)plt.xlim(0,8)plt.savefig('testPlot.png')

Actual outcome

testPlot

Expected outcome

testPlot

Additional information

In the test case, when no limit is set, hatch is rendered correctly.

When limits are set, the following work as expected:
plt.xlim(0,9) ... plt.xlim(8,9)

But these limit cause hatch to be unrendered
plt.xlim(0,1) ... plt.xlim(0,8)

the exact parameters likely depend on data being plotted. On a live dataset that I was using, the hatch was partially rendered in some of the expected area but cut off elsewhere (not at the limits set)

Operating system

WSL2

Matplotlib Version

3.8.4

Matplotlib Backend

pgf

Python version

3.12.2

Jupyter version

No response

Installation

conda

Metadata

Metadata

Assignees

No one assigned

    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