File tree Expand file tree Collapse file tree 1 file changed +13
-4
lines changed
Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Original file line number Diff line number Diff line change 3232
3333
3434# You can force all the contours to be the same color.
35- # Use colors = 'k' to make negative contours dashed;
36- # use colors = ('k',) to leave all contours solid.
3735figure ()
3836CS = contour (X , Y , Z , 6 ,
39- colors = 'k' , # or ('k',) for all solid
37+ colors = 'k' , # negative contours will be dashed by default
4038 )
4139clabel (CS , fontsize = 9 , inline = 1 )
42- title ('Single color' )
40+ title ('Single color - negative contours dashed' )
41+
42+ # You can set the dash pattern for negative contours
43+ # (default is dashed). Specified as (on, off) in pixels.
44+ # Making the second element of the tuple zero yields solid lines.
45+ rcParams ['contour.negative_linestyle' ] = (6 ,0 )
46+ figure ()
47+ CS = contour (X , Y , Z , 6 ,
48+ colors = 'k' , # negative contours will be dashed by default
49+ )
50+ clabel (CS , fontsize = 9 , inline = 1 )
51+ title ('Single color - negative contours solid' )
4352
4453
4554# And you can manually specify the colors of the contour
You can’t perform that action at this time.
0 commit comments