# vispy.visuals.isoline module

class vispy.visuals.isoline.IsolineVisual(vertices=None, tris=None, data=None, levels=None, color_lev=None, **kwargs)

  Bases: `LineVisual`

  Isocurves of a tri mesh with data at vertices at different levels.

  Parameters:
    vertices ndarray, shape (Nv, 3) | None

      Vertex coordinates.

    tris ndarray, shape (Nf, 3) | None

      Indices into the vertex array.

    data ndarray, shape (Nv,) | None

      scalar at vertices

    levels ndarray, shape (Nlev,) | None

      The levels at which the isocurve is constructed from “data”.

    color_lev Color, tuple, colormap name or array

      The color to use when drawing the line. If an array is given, it must be of shape (Nlev, 4) and provide one rgba color by level.

    **kwargs dict

      Keyword arguments to pass to LineVisual.

  property color
  property data

    The mesh data

  property levels

    The threshold at which the isocurves are constructed from the data.

  set_color(color)

    Set the color

    Parameters:
      color instance of Color

        The color to use.

  set_data(vertices=None, tris=None, data=None)

    Set the data

    Parameters:
      vertices ndarray, shape (Nv, 3) | None

        Vertex coordinates.

      tris ndarray, shape (Nf, 3) | None

        Indices into the vertex array.

      data ndarray, shape (Nv,) | None

        scalar at vertices

vispy.visuals.isoline.iso_mesh_line(vertices, tris, vertex_data, levels)

  Generate an isocurve from vertex data in a surface mesh.

  Parameters:
    vertices ndarray, shape (Nv, 3)

      Vertex coordinates.

    tris ndarray, shape (Nf, 3)

      Indices of triangular element into the vertices array.

    vertex_data ndarray, shape (Nv,)

      data at vertex.

    levels ndarray, shape (Nl,)

      Levels at which to generate an isocurve

  Returns:
    lines ndarray, shape (Nvout, 3)

      Vertex coordinates for lines points

    connects ndarray, shape (Ne, 2)

      Indices of line element into the vertex array.

    vertex_level: ndarray, shape (Nvout,)

      level for vertex in lines

  Notes

  Uses a marching squares algorithm to generate the isolines.

previous

vispy.visuals.isocurve module

next

vispy.visuals.isosurface module