| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -453,11 +453,17 @@ def draw_path(self, gc, path, transform, rgbFace=None): | |||
| 453 | 453 | r"{\pgfqpoint{0in}{0in}}{\pgfqpoint{1in}{1in}}") | |
| 454 | 454 | _writeln(self.fh, r"\pgfusepath{clip}") | |
| 455 | 455 | scale = mpl.transforms.Affine2D().scale(self.dpi) | |
| 456 | + # Store default PGF line width | ||
| 457 | + _writeln(self.fh, r"\newlength{\defaultpgflinewidth}") | ||
| 458 | + _writeln(self.fh, | ||
| 459 | + r"\setlength{\defaultpgflinewidth}{\pgflinewidth}") | ||
| 456 | 460 | lw = (mpl.rcParams["hatch.linewidth"] | |
| 457 | 461 | * mpl_pt_to_in * latex_in_to_pt) | |
| 458 | 462 | _writeln(self.fh, r"\pgfsetlinewidth{%fpt}" % lw) | |
| 459 | 463 | self._print_pgf_path(None, gc.get_hatch_path(), scale) | |
| 460 | 464 | self._pgf_path_draw(stroke=True) | |
| 465 | + # Restore default PGF line width | ||
| 466 | + _writeln(self.fh, r"\pgfsetlinewidth{\defaultpgflinewidth}") | ||
| 461 | 467 | _writeln(self.fh, r"\end{pgfscope}") | |
| 462 | 468 | _writeln(self.fh, r"}") | |
| 463 | 469 | # repeat pattern, filling the bounding rect of the path | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -377,7 +377,6 @@ def test_sketch_params(): | |||
| 377 | 377 | assert baseline in buf | |
| 378 | 378 | ||
| 379 | 379 | ||
| 380 | - <<<<<<< HEAD | ||
| 381 | 380 | # test to make sure that the document font size is set consistently (see #26892) | |
| 382 | 381 | @needs_pgf_xelatex | |
| 383 | 382 | @pytest.mark.skipif( | |
@@ -400,7 +399,8 @@ def test_document_font_size(): | |||
| 400 | 399 | label=r'\normalsize the document font size is \the\fontdimen6\font' | |
| 401 | 400 | ) | |
| 402 | 401 | plt.legend() | |
| 403 | - ======= | ||
| 402 | + | ||
| 403 | + | ||
| 404 | 404 | @needs_pgf_xelatex | |
| 405 | 405 | @pytest.mark.backend('pgf') | |
| 406 | 406 | @image_comparison(['hatch_linewidth'], extensions=['pdf']) | |
@@ -409,4 +409,3 @@ def test_pgf_hatch_linewidth(): | |||
| 409 | 409 | mpl.rcParams['hatch.linewidth'] = 0.1 | |
| 410 | 410 | ||
| 411 | 411 | plt.bar(1, 1, color='white', edgecolor='black', hatch='/') | |
| 412 | - >>>>>>> 7cbcd44f9a (Fix hatch linewidth in PGF) | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments