Skip to content

3D Stems

stem3d() over named columns of a dataframe_mojo DataFrame (#743). Each argument names a column instead of holding the values.

3D Stems

Usage

from std.math import cos, sin

from dataviz import save, stem3d

def main() raises:
    # Illustrative readings taken around a circular track.
    var x = List[Float64]()
    var y = List[Float64]()
    var z = List[Float64]()
    for i in range(28):
        var t = Float64(i) * 0.224
        x.append(cos(t))
        y.append(sin(t))
        z.append(1.0 + cos(t * 3.0) * 0.6)

    var c = stem3d(
        x, y, z, title="Illustrative Readings Around a Track"
    )
    save(c, "docs/src/examples/out_stem3d.svg")

See Data shapes for shared input conventions.

Args:

  • df: The frame to read.
  • x: The numeric column for this channel.
  • y: The numeric column for this channel.
  • z: The numeric column for this channel.
  • elev: See the list overload.
  • azim: See the list overload.
  • theme: See the list overload.
  • width: See the list overload.
  • height: See the list overload.
  • title: See the list overload.
  • subtitle: See the list overload.

Related

Related charts: Voxels · 3D Arrows

Relevant API: stem3d