Polar Bar
polarbar() 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.
Usage
from dataviz import polarbar
from dataviz import save
def main() raises:
var direction: List[String] = [
"N", "NE", "E", "SE", "S", "SW", "W", "NW",
]
# Illustrative share of observations from each direction; sums to 100%.
var frequency: List[Int] = [18, 12, 9, 7, 11, 14, 16, 13]
var c = polarbar(
direction,
frequency,
title="Illustrative Wind Direction Frequency (%)",
)
save(c, "docs/src/examples/out_polarbar.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.padding: 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: Nightingale Rose · Radial Bar
Relevant API: polarbar