matplotlib.hatch#

Module for generating hatch patterns.

For examples of using the hatch API, seeHatch style reference.

The following hatching patterns are available, shown here at level 2 density:

(Sourcecode,2x.png,png)

8 squares, each showing the pattern corresponding to the hatch symbol: symbol '/' makes right leaning diagonals, '\' makes left leaning diagonals, '|' makes vertical lines, '-' makes horizontal lines, '+' makes a grid, 'X' makes a grid rotated 90 degrees, 'o' makes small unfilled circles, 'O' makes large unfilled circles, '.' makes small filled circles, and '*' makes a star with 5 points
classmatplotlib.hatch.Circles(hatch,density)[source]#

Bases:Shapes

classmatplotlib.hatch.HatchPatternBase[source]#

Bases:object

The base class for a hatch pattern.

classmatplotlib.hatch.HorizontalHatch(hatch,density)[source]#

Bases:HatchPatternBase

set_vertices_and_codes(vertices,codes)[source]#
classmatplotlib.hatch.LargeCircles(hatch,density)[source]#

Bases:Circles

size=0.35#
classmatplotlib.hatch.NorthEastHatch(hatch,density)[source]#

Bases:HatchPatternBase

set_vertices_and_codes(vertices,codes)[source]#
classmatplotlib.hatch.Shapes(hatch,density)[source]#

Bases:HatchPatternBase

filled=False#
set_vertices_and_codes(vertices,codes)[source]#
classmatplotlib.hatch.SmallCircles(hatch,density)[source]#

Bases:Circles

size=0.2#
classmatplotlib.hatch.SmallFilledCircles(hatch,density)[source]#

Bases:Circles

filled=True#
size=0.1#
classmatplotlib.hatch.SouthEastHatch(hatch,density)[source]#

Bases:HatchPatternBase

set_vertices_and_codes(vertices,codes)[source]#
classmatplotlib.hatch.Stars(hatch,density)[source]#

Bases:Shapes

filled=True#
size=0.3333333333333333#
classmatplotlib.hatch.VerticalHatch(hatch,density)[source]#

Bases:HatchPatternBase

set_vertices_and_codes(vertices,codes)[source]#
matplotlib.hatch.get_path(hatchpattern,density=6)[source]#

Given a hatch specifier,hatchpattern, generates Path to renderthe hatch in a unit square.density is the number of lines perunit square.