StreamplotSet ¶
StreamplotSet(lines: DataFrame, arrows: DataFrame)
Streamlines and their arrows, as matplotlib's StreamplotSet.
Attributes:
-
lines(DataFrame) –Columns
x,yandgroup: the vertices of each line in order, onegroupper line (draw withgeom_path(aes(group="group"))). -
arrows(DataFrame) –Columns
x,y,xend,yendandgroup: one short segment per line at half its arc length, pointing along the flow (draw withgeom_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']