Area example
()
| 263 | |
| 264 | @_print_source |
| 265 | def plot_area(): |
| 266 | """ |
| 267 | Area example |
| 268 | """ |
| 269 | import pandas as pd |
| 270 | import chartify |
| 271 | |
| 272 | # Generate example data |
| 273 | data = chartify.examples.example_data() |
| 274 | |
| 275 | total_quantity_by_month_and_fruit = ( |
| 276 | data.groupby([data["date"] + pd.offsets.MonthBegin(-1), "fruit"])["quantity"] |
| 277 | .sum() |
| 278 | .reset_index() |
| 279 | .rename(columns={"date": "month"}) |
| 280 | .sort_values("month") |
| 281 | ) |
| 282 | print(total_quantity_by_month_and_fruit.head()) |
| 283 | """Print break""" |
| 284 | _area_example_1(total_quantity_by_month_and_fruit) |
| 285 | _area_example_2(total_quantity_by_month_and_fruit) |
| 286 | _plot_shaded_interval(data) |
| 287 | |
| 288 | |
| 289 | @_print_source |
nothing calls this directly
no test coverage detected