File tree 3 files changed +6
-10
lines changed 3 files changed +6
-10
lines changed Original file line number Diff line number Diff line change @@ -1119,8 +1119,6 @@ def set_hatch_color(self, hatch_color):
1119
1119
"""
1120
1120
Gets the color to use for hatching.
1121
1121
"""
1122
- if hatch_color is None :
1123
- raise ValueError ()
1124
1122
self ._hatch_color = hatch_color
1125
1123
1126
1124
def get_hatch_linewidth (self ):
Original file line number Diff line number Diff line change @@ -299,9 +299,9 @@ def draw(self, renderer):
299
299
gc .set_hatch_color (self ._hatch_color )
300
300
except AttributeError :
301
301
# if we end up with a GC that does not have this method
302
- import warnings
303
- warnings . warn ( "Your backend does not have support for "
304
- "setting the hatch color." )
302
+ warnings . warn ( "Your backend does not support setting the "
303
+ "hatch color." )
304
+
305
305
306
306
if self .get_sketch_params () is not None :
307
307
gc .set_sketch_params (* self .get_sketch_params ())
Original file line number Diff line number Diff line change 5
5
6
6
import six
7
7
from six .moves import map , zip
8
+ import warnings
8
9
9
10
import math
10
11
@@ -117,7 +118,6 @@ def __init__(self,
117
118
self ._fill = True # needed for set_facecolor call
118
119
if color is not None :
119
120
if (edgecolor is not None or facecolor is not None ):
120
- import warnings
121
121
warnings .warn ("Setting the 'color' property will override"
122
122
"the edgecolor or facecolor properties. " )
123
123
self .set_color (color )
@@ -556,7 +556,6 @@ def draw(self, renderer):
556
556
gc .set_hatch_color (self ._hatch_color )
557
557
except AttributeError :
558
558
# if we end up with a GC that does not have this method
559
- import warnings
560
559
warnings .warn ("Your backend does not have support for "
561
560
"setting the hatch color." )
562
561
@@ -4305,9 +4304,8 @@ def draw(self, renderer):
4305
4304
gc .set_hatch_color (self ._hatch_color )
4306
4305
except AttributeError :
4307
4306
# if we end up with a GC that does not have this method
4308
- import warnings
4309
- warnings .warn ("Your backend does not have support for "
4310
- "setting the hatch color." )
4307
+ warnings .warn ("Your backend does not support setting the "
4308
+ "hatch color." )
4311
4309
4312
4310
if self .get_sketch_params () is not None :
4313
4311
gc .set_sketch_params (* self .get_sketch_params ())
You can’t perform that action at this time.
0 commit comments