MCPcopy Create free account
hub / github.com/spotify/chartify / _bar_example_1

Function _bar_example_1

chartify/examples.py:409–419  ·  view source on GitHub ↗

# Plot the data ordered by the numerical axis

(quantity_by_fruit)

Source from the content-addressed store, hash-verified

407
408@_print_source
409def _bar_example_1(quantity_by_fruit):
410 """# Plot the data ordered by the numerical axis"""
411 ch = chartify.Chart(blank_labels=True, x_axis_type="categorical")
412 ch.set_title("Vertical bar plot")
413 ch.set_subtitle("Automatically sorts by value counts.")
414 ch.plot.bar(
415 data_frame=quantity_by_fruit,
416 categorical_columns="fruit",
417 numeric_column="quantity",
418 )
419 ch.show(_OUTPUT_FORMAT)
420
421
422@_print_source

Callers 1

plot_barFunction · 0.85

Calls 4

set_titleMethod · 0.95
set_subtitleMethod · 0.95
showMethod · 0.95
barMethod · 0.80

Tested by

no test coverage detected