@@ -258,7 +258,7 @@ def emit(graphics, i, xyzs, quads):
258258 # computed contour levels have equal distance between them,
259259 # and half that between first/last contours and zmin/zmax
260260 dz = (zmax - zmin ) / levels
261- levels = zmin + np .arange (levels ) * dz + dz / 2
261+ levels = zmin + np .arange (levels ) * dz + dz / 2
262262
263263 # one contour line per contour level
264264 for level in levels :
@@ -277,12 +277,18 @@ def emit(graphics, i, xyzs, quads):
277277 if background :
278278 with Timer ("contour background" ):
279279 # add extra levels below zmin and above zmax to define end ranges
280- levels = [zmin - (levels [0 ]- zmin )] + list (levels ) + [zmax + (zmax - levels [- 1 ])]
280+ levels = (
281+ [zmin - (levels [0 ] - zmin )]
282+ + list (levels )
283+ + [zmax + (zmax - levels [- 1 ])]
284+ )
281285 for lo , hi in zip (levels [:- 1 ], levels [1 :]):
282286 # use masks and fancy indexing to assign (lo+hi)/2 to all zs between lo and hi
283287 zs [(lo < zs ) & (zs <= hi )] = (lo + hi ) / 2
284- colors = density_colors (zs ) # same colors as density plot
285- graphics .add_complex (xyzs [:, 0 :2 ], lines = None , polys = quads , colors = colors )
288+ colors = density_colors (zs ) # same colors as density plot
289+ graphics .add_complex (
290+ xyzs [:, 0 :2 ], lines = None , polys = quads , colors = colors
291+ )
286292
287293 # plot_options.plotpoints = [n * 10 for n in plot_options.plotpoints]
288294 return make_plot (plot_options , evaluation , dim = 2 , is_complex = False , emit = emit )
0 commit comments