# Examples from pyvista.ChartMPL.figure
# =====================================

# Create a matplotlib chart from an existing figure.
import pyvista as pv
import matplotlib.pyplot as plt
f, ax = plt.subplots()
_ = ax.plot([0, 1, 2], [2, 1, 3])

chart = pv.ChartMPL(f)
chart.figure is f
chart.show()

# ----------------------------------------------------------------------
# Generated by sphinx-examples-as-code https://github.com/pyvista/sphinx-examples-as-code

