Skip to content

Commit d072fc2

Browse files
committed
Generate rasterized hatching at correct DPI.
The hatch buffer was created at 72 pixels, with the assumption that that is the "unit square" (1in*1in). However, with default DPI increased to 100, that buffer is actually too small, causing hatching to be denser than it should be. On test images where the DPI was set really low, the hatching was less dense than it should be. Fixes matplotlib#4108.
1 parent a3d7af4 commit d072fc2

File tree

12 files changed

+12
-4
lines changed

12 files changed

+12
-4
lines changed

doc/users/dflt_style_changes.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -625,6 +625,11 @@ The behavior of the PS and Agg backends was DPI dependent, thus::
625625

626626
There is no API level control of the hatch color or linewidth.
627627

628+
Hatching patterns are now rendered at a consistent density, regardless of DPI.
629+
Formerly, high DPI figures would be more dense than the default, and low DPI
630+
figures would be less dense. This old behavior cannot be directly restored,
631+
but the density may be increased by repeating the hatch specifier.
632+
628633

629634
.. _default_changes_font:
630635

6.6 KB
Loading
2.21 KB
Loading
-1.76 KB
Loading
1.13 KB
Loading
4.87 KB
Loading
7.16 KB
Loading
8 KB
Loading
5.07 KB
Loading
4.12 KB
Loading

0 commit comments

Comments
 (0)