@@ -372,9 +372,8 @@ def set_linewidth(self, w):
372372 self ._linewidth = float (w )
373373 # scale the dash pattern by the linewidth
374374 offset , ls = self ._us_dashes
375- self ._dashes = mlines ._scale_dashes (offset ,
376- ls ,
377- self ._linewidth )[1 ]
375+ self ._dashoffset , self ._dashes = mlines ._scale_dashes (
376+ offset , ls , self ._linewidth )
378377 self .stale = True
379378
380379 def set_lw (self , lw ):
@@ -417,9 +416,8 @@ def set_linestyle(self, ls):
417416 # get the unscalled dash pattern
418417 offset , ls = self ._us_dashes = mlines ._get_dash_pattern (ls )
419418 # scale the dash pattern by the linewidth
420- self ._dashes = mlines ._scale_dashes (offset ,
421- ls ,
422- self ._linewidth )[1 ]
419+ self ._dashoffset , self ._dashes = mlines ._scale_dashes (
420+ offset , ls , self ._linewidth )
423421 self .stale = True
424422
425423 def set_ls (self , ls ):
@@ -4271,7 +4269,7 @@ def draw(self, renderer):
42714269 if self ._edgecolor [3 ] == 0 :
42724270 lw = 0
42734271 gc .set_linewidth (lw )
4274- gc .set_linestyle (self ._linestyle )
4272+ gc .set_dashes (self ._dashoffset , self . _dashes )
42754273
42764274 gc .set_antialiased (self ._antialiased )
42774275 self ._set_gc_clip (gc )
0 commit comments