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

Function _bar_example_3

chartify/examples.py:439–450  ·  view source on GitHub ↗

# Plot the data with color grouping

(quantity_by_fruit)

Source from the content-addressed store, hash-verified

437
438@_print_source
439def _bar_example_3(quantity_by_fruit):
440 """# Plot the data with color grouping"""
441 ch = chartify.Chart(blank_labels=True, y_axis_type="categorical")
442 ch.set_title("Horizontal bar plot")
443 ch.set_subtitle("Horizontal with color grouping")
444 ch.plot.bar(
445 data_frame=quantity_by_fruit,
446 categorical_columns="fruit",
447 numeric_column="quantity",
448 color_column="fruit",
449 )
450 ch.show(_OUTPUT_FORMAT)
451
452
453@_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