@@ -535,7 +535,7 @@ def __init__(self, ax, *args, **kwargs):
535535 self .levels = kwargs .get ('levels' , None )
536536 self .filled = kwargs .get ('filled' , False )
537537 self .linewidths = kwargs .get ('linewidths' , None )
538- self .linestyles = kwargs .get ('linestyles' , 'solid' )
538+ self .linestyles = kwargs .get ('linestyles' , None )
539539
540540 self .alpha = kwargs .get ('alpha' , 1.0 )
541541 self .origin = kwargs .get ('origin' , None )
@@ -613,9 +613,6 @@ def __init__(self, ax, *args, **kwargs):
613613 linestyle = lstyle ,
614614 alpha = self .alpha )
615615
616- if level < 0.0 and self .monochrome :
617- ls = mpl .rcParams ['contour.negative_linestyle' ]
618- col .set_linestyle (ls )
619616 col .set_label ('_nolegend_' )
620617 self .ax .add_collection (col , False )
621618 self .collections .append (col )
@@ -857,6 +854,11 @@ def _process_linestyles(self):
857854 Nlev = len (self .levels )
858855 if linestyles is None :
859856 tlinestyles = ['solid' ] * Nlev
857+ if self .monochrome :
858+ neg_ls = mpl .rcParams ['contour.negative_linestyle' ]
859+ for i , lev in enumerate (self .levels ):
860+ if lev < 0.0 :
861+ tlinestyles [i ] = neg_ls
860862 else :
861863 if cbook .is_string_like (linestyles ):
862864 tlinestyles = [linestyles ] * Nlev
0 commit comments