Skip to content
Nightingale Rose

Nightingale Rose

nightingale() over named columns of a dataframe_mojo DataFrame (#743). Each argument names a column instead of holding the values. The axis titles default to the categories and values column names.

Nightingale Rose

Usage

from dataviz import nightingale
from dataviz import save

def main() raises:
    var months: List[String] = [
        "Jan", "Feb", "Mar", "Apr", "May", "Jun",
        "Jul", "Aug", "Sep", "Oct", "Nov", "Dec",
    ]
    # Illustrative monthly bicycle trips, in thousands.
    var trips: List[Int] = [18, 22, 35, 51, 68, 79, 84, 81, 65, 47, 29, 20]

    var c = nightingale(
        months,
        trips,
        area=True,
        title="Illustrative Monthly Bicycle Trips (thousands)",
    )
    save(c, "docs/src/examples/out_nightingale.svg")

See Data shapes for shared input conventions.

Args:

  • df: The frame to read.
  • categories: The string column for this channel.
  • values: The numeric column for this channel.
  • area: 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.
  • x_title: See the list overload.
  • y_title: See the list overload.

Related

Related charts: Polar Bar

Relevant API: nightingale