File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -409,6 +409,10 @@ def set_linestyle(self, ls):
409
409
``'--'`` or ``'dashed'`` dashed line
410
410
``'-.'`` or ``'dashdot'`` dash-dotted line
411
411
``':'`` or ``'dotted'`` dotted line
412
+ ``'None'`` draw nothing
413
+ ``'none'`` draw nothing
414
+ ``' '`` draw nothing
415
+ ``''`` draw nothing
412
416
=========================== =================
413
417
414
418
Alternatively a dash tuple of the following form can be provided::
@@ -424,6 +428,8 @@ def set_linestyle(self, ls):
424
428
"""
425
429
if ls is None :
426
430
ls = "solid"
431
+ if ls in [' ' , '' , 'none' ]:
432
+ ls = 'None'
427
433
self ._linestyle = ls
428
434
# get the unscaled dash pattern
429
435
offset , ls = self ._us_dashes = mlines ._get_dash_pattern (ls )
@@ -540,7 +546,7 @@ def _bind_draw_path_function(self, renderer):
540
546
gc .set_foreground (self ._edgecolor , isRGBA = True )
541
547
542
548
lw = self ._linewidth
543
- if self ._edgecolor [3 ] == 0 :
549
+ if self ._edgecolor [3 ] == 0 or self . _linestyle == 'None' :
544
550
lw = 0
545
551
gc .set_linewidth (lw )
546
552
gc .set_dashes (self ._dashoffset , self ._dashes )
You can’t perform that action at this time.
0 commit comments