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

Skip to content

Commit b2ff3f7

Browse files
committed
DOC: extend hatching section a bit
1 parent 05f8434 commit b2ff3f7

1 file changed

Lines changed: 25 additions & 9 deletions

File tree

doc/users/dflt_style_changes.rst

Lines changed: 25 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -418,24 +418,40 @@ or by setting::
418418
in your :file:`matplotlibrc` file.
419419

420420

421-
422-
Other
423-
=====
424-
425-
- lines.color change, only hits raw usage of Line2D
426-
427421
Hatching
428422
========
429423

430-
- The width of the lines in a hatch pattern is now configurable by the
431-
rcParam `hatch.linewidth`, with a default of 1 point. The old
432-
behavior was different depending on backend:
424+
The width of the lines in a hatch pattern is now configurable by the
425+
rcParam `hatch.linewidth`, with a default of 1 point. The old
426+
behavior was different depending on backend:
433427

434428
- PDF: 0.1 pt
435429
- SVG: 1.0 pt
436430
- PS: 1 px
437431
- Agg: 1 px
438432

433+
The old behavior can not be restored across all backends simultaneously, but
434+
can be restored for a single backend by setting::
435+
436+
mpl.rcParams['hatch.linewidth'] = 0.1 # previous pdf hatch linewidth
437+
mpl.rcParams['hatch.linewidth'] = 1.0 # previous svg hatch linewidth
438+
439+
The behavior of the PS and Agg backends was DPI dependent, thus::
440+
441+
442+
mpl.rcParams['figure.dpi'] = dpi
443+
mpl.rcParams['savefig.dpi'] = dpi # or leave as default 'figure'
444+
mpl.rcParams['hatch.linewidth'] = 1.0 / dpi # previous ps and Agg hatch linewidth
445+
446+
447+
There is no API level control of the hath linewidth.
448+
449+
Other
450+
=====
451+
452+
- lines.color change, only hits raw usage of Line2D
453+
454+
439455
Plot layout
440456
===========
441457

0 commit comments

Comments
 (0)