Skip to content

StreamplotSet

StreamplotSet(lines: DataFrame, arrows: DataFrame)

Streamlines and their arrows, as matplotlib's StreamplotSet.

Attributes:

  • lines (DataFrame) –

    Columns x, y and group: the vertices of each line in order, one group per line (draw with geom_path(aes(group="group"))).

  • arrows (DataFrame) –

    Columns x, y, xend, yend and group: one short segment per line at half its arc length, pointing along the flow (draw with geom_segment(arrow=arrow())).

Examples:

>>> from ggrust import *
>>> x = [0, 1, 2, 3]
>>> y = [0, 1, 2]
>>> streams = streamplot(x, y, [[1.0] * 4] * 3, [[0.5] * 4] * 3)
>>> streams.lines.columns
['x', 'y', 'group']
>>> streams.arrows.columns
['x', 'y', 'xend', 'yend', 'group']