MediaFileManager: Missing file when try to plot two line chart o the same figure

MediaFileManager: Missing file when try to plot two line chart on the same figure. sometimes it is working fine but most of the time doesn’t show anything



code

import pandas as pd
import numpy as np
import seaborn as sns
import matplotlib.pyplot as plt
class Economics():
    def demand_supply_cruve(self , data=None):
        """Graph demand and supply curve
        inputs
        --------------------------------
        Data is a {price:[] , 'Demand':[1,2,3....] , 'Supply':[1,2,3,....] } per unit

        """
        data =  data if data != None else {'price':list(range(0,201,10)) ,'Demand':list(range(0,401,20))[::-1] , 'Supply':list(range(0,401,20))}
        data = pd.DataFrame(data)
        fig, ax = plt.subplots()
        sns.lineplot( x=data["Demand"], y=data["price"])
        sns.lineplot( data=data, x="Supply", y="price")

        return fig

import streamlit as st 
st.title("Eco")
eco = Economics()
st.pyplot(eco.demand_supply_cruve())

@AhmedSalam22 Thanks for letting us know. I think there’s an intermittent bug, and I have a fix. I’m for some testers; would you be willing to try it out with your use cases?

You can download the update from my dropbox.

First you uninstall streamlit

$ pip uninstall streamlit

Then you install the package using the wheel package.

$ pip install wheel
$ pip install PATH/TO/streamlit-0.67.1-py2.py3-none-any.whl

Once you are done, you can uninstall it just like any other version.

$ pip uninstall streamlit

I would really appreciate the help, but if you do not have the time. I understand.

1 Like

@kmcgrady thanks for share seems its work fine!

That’s great! Keep playing with it and let me know if you notice issues. If all goes well, it should be in the new release in the next week or two. :blush: