@_with_element
def pyplot(self, element, fig=None, clear_figure=None, **kwargs):
    'Display a matplotlib.pyplot figure.\n\n        Parameters\n        ----------\n        fig : Matplotlib Figure\n            The figure to plot. When this argument isn\'t specified, which is\n            the usual case, this function will render the global plot.\n\n        clear_figure : bool\n            If True, the figure will be cleared after being rendered.\n            If False, the figure will not be cleared after being rendered.\n            If left unspecified, we pick a default based on the value of `fig`.\n\n            * If `fig` is set, defaults to `False`.\n\n            * If `fig` is not set, defaults to `True`. This simulates Jupyter\'s\n              approach to matplotlib rendering.\n\n        **kwargs : any\n            Arguments to pass to Matplotlib\'s savefig function.\n\n        Example\n        -------\n        >>> import matplotlib.pyplot as plt\n        >>> import numpy as np\n        >>>\n        >>> arr = np.random.normal(1, 1, size=100)\n        >>> plt.hist(arr, bins=20)\n        >>>\n        >>> st.pyplot()\n\n        .. output::\n           https://share.streamlit.io/0.25.0-2JkNY/index.html?id=PwzFN7oLZsvb6HDdwdjkRB\n           height: 530px\n\n        Notes\n        -----\n        Matplotlib support several different types of "backends". If you\'re\n        getting an error using Matplotlib with Streamlit, try setting your\n        backend to "TkAgg"::\n\n            echo "backend: TkAgg" >> ~/.matplotlib/matplotlibrc\n\n        For more information, see https://matplotlib.org/faq/usage_faq.html.\n\n        '
    import streamlit.elements.pyplot as pyplot
    pyplot.marshall(self._get_coordinates, element, fig, clear_figure, **kwargs)
Display a matplotlib.pyplot figure.

Parameters
----------
fig : Matplotlib Figure
    The figure to plot. When this argument isn't specified, which is
    the usual case, this function will render the global plot.

clear_figure : bool
    If True, the figure will be cleared after being rendered.
    If False, the figure will not be cleared after being rendered.
    If left unspecified, we pick a default based on the value of `fig`.

    * If `fig` is set, defaults to `False`.

    * If `fig` is not set, defaults to `True`. This simulates Jupyter's
      approach to matplotlib rendering.

**kwargs : any
    Arguments to pass to Matplotlib's savefig function.

Example
-------
>>> import matplotlib.pyplot as plt
>>> import numpy as np
>>>
>>> arr = np.random.normal(1, 1, size=100)
>>> plt.hist(arr, bins=20)
>>>
>>> st.pyplot()

.. output::
   https://share.streamlit.io/0.25.0-2JkNY/index.html?id=PwzFN7oLZsvb6HDdwdjkRB
   height: 530px

Notes
-----
Matplotlib support several different types of "backends". If you're
getting an error using Matplotlib with Streamlit, try setting your
backend to "TkAgg"::

    echo "backend: TkAgg" >> ~/.matplotlib/matplotlibrc

For more information, see https://matplotlib.org/faq/usage_faq.html.
@_with_element
def pyplot(self, element, fig=None, clear_figure=None, **kwargs):
    'Display a matplotlib.pyplot figure.\n\n        Parameters\n        ----------\n        fig : Matplotlib Figure\n            The figure to plot. When this argument isn\'t specified, which is\n            the usual case, this function will render the global plot.\n\n        clear_figure : bool\n            If True, the figure will be cleared after being rendered.\n            If False, the figure will not be cleared after being rendered.\n            If left unspecified, we pick a default based on the value of `fig`.\n\n            * If `fig` is set, defaults to `False`.\n\n            * If `fig` is not set, defaults to `True`. This simulates Jupyter\'s\n              approach to matplotlib rendering.\n\n        **kwargs : any\n            Arguments to pass to Matplotlib\'s savefig function.\n\n        Example\n        -------\n        >>> import matplotlib.pyplot as plt\n        >>> import numpy as np\n        >>>\n        >>> arr = np.random.normal(1, 1, size=100)\n        >>> plt.hist(arr, bins=20)\n        >>>\n        >>> st.pyplot()\n\n        .. output::\n           https://share.streamlit.io/0.25.0-2JkNY/index.html?id=PwzFN7oLZsvb6HDdwdjkRB\n           height: 530px\n\n        Notes\n        -----\n        Matplotlib support several different types of "backends". If you\'re\n        getting an error using Matplotlib with Streamlit, try setting your\n        backend to "TkAgg"::\n\n            echo "backend: TkAgg" >> ~/.matplotlib/matplotlibrc\n\n        For more information, see https://matplotlib.org/faq/usage_faq.html.\n\n        '
    import streamlit.elements.pyplot as pyplot
    pyplot.marshall(self._get_coordinates, element, fig, clear_figure, **kwargs)