original_docstring: Modify the alphas of the color list according to depth.
docstring: Modify the alphas of the color list according to depth.
docstring_tokens: Modify the alphas of the color list according to depth .
code: def zalpha(colors, zs):
      """Modify the alphas of the color list according to depth."""
      # FIXME: This only works well if the points for *zs* are well-spaced
      #        in all three dimensions. Otherwise, at certain orientations,
      #        the min and max zs are very close together.
      #        Should really normalize against the viewing depth.
      colors = get_colors(colors, len(zs))
      if len(zs):
          norm = Normalize(min(zs), max(zs))
          sats = 1 - norm(zs) * 0.7
          colors = [(c[0], c[1], c[2], c[3] * s) for c, s in zip(colors, sats)]
      return colors
code_tokens: def zalpha ( colors , zs ) : colors = get_colors ( colors , len ( zs ) ) if len ( zs ) : norm = Normalize ( min ( zs ) , max ( zs ) ) sats = 1 - norm ( zs ) * 0.7 colors = [ ( c [ 0 ] , c [ 1 ] , c [ 2 ] , c [ 3 ] * s ) for c , s in zip ( colors , sats ) ] return colors
short_docstring: Modify the alphas of the color list according to depth.
short_docstring_tokens: Modify the alphas of the color list according to depth .
comment: """Modify the alphas of the color list according to depth."""$SEP$# FIXME: This only works well if the points for *zs* are well-spaced$SEP$#        in all three dimensions. Otherwise, at certain orientations,$SEP$#        the min and max zs are very close together.$SEP$#        Should really normalize against the viewing depth.