Black Lives Matter. Please consider donating to Black Girls Code today.
https://www.blackgirlscode.com

Race Bar Chart - Using Matplotlib in Dash

Hey,

I have race bar chart animated with matplotlib.animation:

It works perfectly so far however I’m looking to add this plot into a dashboard. You can see the code at

I’ve been trying to use

mpl_to_plotly

from plotly.tools so that dash can read the plot as if it was coded in plotly but have been unsuccessful so far. I’ve went through the documentation but can’t figure out how to call it such that I have something like:

return go.Figure(race_bar_plot)

on my DashFormatting.py

Apologies if something didn’t make sense, I’m very new to python and dash.

Thank you in advance!