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

Commit4b2dc96

Browse files
committed
Try restoring linewidth
1 parent7cbcd44 commit4b2dc96

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

‎lib/matplotlib/backends/backend_pgf.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -477,11 +477,17 @@ def draw_path(self, gc, path, transform, rgbFace=None):
477477
r"{\pgfqpoint{0in}{0in}}{\pgfqpoint{1in}{1in}}")
478478
_writeln(self.fh,r"\pgfusepath{clip}")
479479
scale=mpl.transforms.Affine2D().scale(self.dpi)
480+
# Store default PGF line width
481+
_writeln(self.fh,r"\newlength{\defaultpgflinewidth}")
482+
_writeln(self.fh,
483+
r"\setlength{\defaultpgflinewidth}{\pgflinewidth}")
480484
lw= (mpl.rcParams["hatch.linewidth"]
481485
*mpl_pt_to_in*latex_in_to_pt)
482486
_writeln(self.fh,r"\pgfsetlinewidth{%fpt}"%lw)
483487
self._print_pgf_path(None,gc.get_hatch_path(),scale)
484-
self._pgf_path_draw(stroke=True)
488+
self._pgf_path_draw()
489+
# Restore default PGF line width
490+
_writeln(self.fh,r"\pgfsetlinewidth{\defaultpgflinewidth}")
485491
_writeln(self.fh,r"\end{pgfscope}")
486492
_writeln(self.fh,r"}")
487493
# repeat pattern, filling the bounding rect of the path

‎lib/matplotlib/tests/test_backend_pgf.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,6 @@ def test_sketch_params():
368368
assertbaselineinbuf
369369

370370

371-
@needs_pgf_xelatex
372371
@pytest.mark.backend('pgf')
373372
@image_comparison(['hatch_linewidth'],extensions=['pdf'])
374373
deftest_pgf_hatch_linewidth():

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp