Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d260be0

Browse files
committed
Merge pull request #2116 from pwuertz/fix_1881
fix issue #1881, pgf: add style information for hatchings
2 parents a7200b6 + 681e783 commit d260be0

6 files changed

Lines changed: 2 additions & 0 deletions

File tree

lib/matplotlib/backends/backend_pgf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -450,6 +450,7 @@ def draw_path(self, gc, path, transform, rgbFace=None):
450450
# if present, draw pattern on top
451451
if gc.get_hatch():
452452
writeln(self.fh, r"\begin{pgfscope}")
453+
self._print_pgf_path_styles(gc, rgbFace)
453454

454455
# combine clip and path for clipping
455456
self._print_pgf_clip(gc)
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

lib/matplotlib/tests/test_backend_pgf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ def create_figure():
6767
plt.figure()
6868
x = np.linspace(0, 1, 15)
6969
plt.plot(x, x**2, "b-")
70+
plt.fill_between([0., .4], [.4, 0.], hatch='//', facecolor="lightgray", edgecolor="red")
7071
plt.plot(x, 1-x**2, "g>")
7172
plt.plot([0.9], [0.5], "ro", markersize=3)
7273
plt.text(0.9, 0.5, u'unicode (ü, °, µ) and math ($\\mu_i = x_i^2$)', ha='right', fontsize=20)

0 commit comments

Comments
 (0)