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

Function _shaded_interval_example_1

chartify/examples.py:367–382  ·  view source on GitHub ↗

# Line with datetime x axis

(price_by_date)

Source from the content-addressed store, hash-verified

365
366@_print_source
367def _shaded_interval_example_1(price_by_date):
368 """# Line with datetime x axis"""
369 # Plot the data
370 ch = chartify.Chart(blank_labels=True, x_axis_type="datetime")
371 ch.set_title("Area with second_y_column")
372 ch.set_subtitle("Use alone or combined with line graphs to represent confidence.")
373 ch.plot.area(
374 data_frame=price_by_date,
375 x_column="date",
376 y_column="lower_ci",
377 second_y_column="upper_ci",
378 )
379 # Reset to ensure same color of line & shaded interval
380 ch.style.color_palette.reset_palette_order()
381 ch.plot.line(data_frame=price_by_date, x_column="date", y_column="mean")
382 ch.show(_OUTPUT_FORMAT)
383
384
385plot_area.__doc__ = _core.plot.PlotNumericXY.area.__doc__

Callers 1

_plot_shaded_intervalFunction · 0.85

Calls 6

set_titleMethod · 0.95
set_subtitleMethod · 0.95
showMethod · 0.95
reset_palette_orderMethod · 0.80
areaMethod · 0.45
lineMethod · 0.45

Tested by

no test coverage detected