Displaying a Matplotlib Plot in zero-true
Displaying a Matplotlib Plot
Matplotlib is one of the more popular plotting libraries in the python ecosystem, and zero-true has built in integrations for working with matplotlib plots. There is some slight nuance to how to work with matplotlib in zero-true though so take a look at the example below:
Run the cell in your notebook, and watch the line plot appear below! Matplotlib components require an ID as well as a matplotlib figure passed as arguments to render. Since matplotlib plots are static components in zero-true there are no values for you to access that users interact with.
Interactive Matplotlib Plots in Zero-True
Let’s take the code above and make it a little bit more exciting by interactively setting the last Y value in the plot:
Combining matplotlib’s awesome capabilities with zero-true’s interactive notebook and UI can help take your visualization game to the next level.