@@ -731,7 +731,7 @@ def __init__(self, ax, *args, **kwargs):
731
731
self .linewidths = kwargs .get ('linewidths' , None )
732
732
self .linestyles = kwargs .get ('linestyles' , None )
733
733
734
- self .hatch = kwargs .get ('hatch ' , [None ])
734
+ self .hatches = kwargs .get ('hatches ' , [None ])
735
735
736
736
self .alpha = kwargs .get ('alpha' , None )
737
737
self .origin = kwargs .get ('origin' , None )
@@ -911,11 +911,11 @@ def changed(self):
911
911
tcolors = [ (tuple (rgba ),) for rgba in
912
912
self .to_rgba (self .cvalues , alpha = self .alpha )]
913
913
self .tcolors = tcolors
914
- thatches = self .hatch * len (tcolors )
915
- self .thatches = thatches
916
- for color , hatch , collection in zip (tcolors , thatches , self .collections ):
914
+ hatches = self .hatches * len (tcolors )
915
+ for color , hatch , collection in zip (tcolors , hatches , self .collections ):
917
916
if self .filled :
918
917
collection .set_facecolor (color )
918
+ # update the collection's hatch (may be None)
919
919
collection .set_hatch (hatch )
920
920
else :
921
921
collection .set_color (color )
@@ -1486,6 +1486,10 @@ def _initialize_x_y(self, z):
1486
1486
points. This may never actually be advantageous, so this option may
1487
1487
be removed. Chunking introduces artifacts at the chunk boundaries
1488
1488
unless *antialiased* is *False*.
1489
+
1490
+ *hatches*:
1491
+ A list of cross hatch patterns to use on the filled areas.
1492
+ If None, no hatching will be added to the contour.
1489
1493
1490
1494
Note: contourf fills intervals that are closed at the top; that
1491
1495
is, for boundaries *z1* and *z2*, the filled region is::
0 commit comments