Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PyplotGlobalUseWarning #4

Open
johnfelipe opened this issue Jun 9, 2021 · 3 comments
Open

PyplotGlobalUseWarning #4

johnfelipe opened this issue Jun 9, 2021 · 3 comments

Comments

@johnfelipe
Copy link

how can solve this in
Future forecast for Alphabet (GOOGL) for a period of 1 week after 20th July, 2020:

PyplotGlobalUseWarning: You are calling st.pyplot() without any arguments. After December 1st, 2020, we will remove the ability to do this as it requires the use of Matplotlib's global figure object, which is not thread-safe.

To future-proof this code, you should pass in a figure as shown below:


>>> fig, ax = plt.subplots()
>>> ax.scatter([1, 2, 3], [1, 2, 3])
>>>    ... other plotting actions ...
>>> st.pyplot(fig)
You can disable this warning by disabling the config option: deprecation.showPyplotGlobalUse


st.set_option('deprecation.showPyplotGlobalUse', False)
or in your .streamlit/config.toml


[deprecation]
showPyplotGlobalUse = False
@ADITYAVOFFICIAL
Copy link
Member

ADITYAVOFFICIAL commented Oct 29, 2023

  • the problem has been fixed

@gunnu23
Copy link

gunnu23 commented Jun 5, 2024

in you code editor , you can just paste the following line : st.set_option('deprecation.showPyplotGlobalUse', False)
and refresh , it works totally fine and doesnt give any warning

@ADITYAVOFFICIAL
Copy link
Member

The code that was pulled last year fixed all the issues and apis

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants