Line example
()
| 1328 | |
| 1329 | @_print_source |
| 1330 | def callout_line(): |
| 1331 | """ |
| 1332 | Line example |
| 1333 | """ |
| 1334 | import chartify |
| 1335 | |
| 1336 | # Generate example data |
| 1337 | data = chartify.examples.example_data() |
| 1338 | |
| 1339 | # Plot the data |
| 1340 | ( |
| 1341 | chartify.Chart(blank_labels=True) |
| 1342 | .plot.scatter(data_frame=data, x_column="unit_price", y_column="total_price") |
| 1343 | .callout.line(2) # Callout horizontal line |
| 1344 | .callout.line(1, "height") # Callout vertical line |
| 1345 | .set_title("Line callout") |
| 1346 | .set_subtitle("Callout lines on either axis") |
| 1347 | .show(_OUTPUT_FORMAT) |
| 1348 | ) |
| 1349 | |
| 1350 | |
| 1351 | @_print_source |
nothing calls this directly
no test coverage detected