# Plot the data ordered by the numerical axis
(quantity_by_fruit)
| 407 | |
| 408 | @_print_source |
| 409 | def _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 |
no test coverage detected