Shrikrishna commited on
Commit
016e17f
1 Parent(s): 3aad77e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -6
app.py CHANGED
@@ -19,20 +19,23 @@ st.write(df.describe())
19
 
20
  st.subheader("Closing Price VS Time Chart:")
21
  fig = plt.figure(figsize=(12,6))
22
- plt.plot(df.Close)
 
23
  st.pyplot(fig)
24
 
25
  moving_avg_100 = df.Close.rolling(100).mean()
26
  st.subheader("Closing Price VS Time Chart With 100Moving Average:")
27
  fig = plt.figure(figsize=(12,6))
28
- plt.plot(df.Close)
29
- plt.plot(moving_avg_100,'red')
 
30
  st.pyplot(fig)
31
 
32
  moving_avg_200 = df.Close.rolling(200).mean()
33
  st.subheader("Closing Price VS Time Chart With 100Moving Average and 200Moving Average:")
34
  fig = plt.figure(figsize=(12,6))
35
- plt.plot(df.Close)
36
- plt.plot(moving_avg_100,'red')
37
- plt.plot(moving_avg_200,'green')
 
38
  st.pyplot(fig)
 
19
 
20
  st.subheader("Closing Price VS Time Chart:")
21
  fig = plt.figure(figsize=(12,6))
22
+ plt.plot(df.Close, label="Closing Price")
23
+ plt.legend()
24
  st.pyplot(fig)
25
 
26
  moving_avg_100 = df.Close.rolling(100).mean()
27
  st.subheader("Closing Price VS Time Chart With 100Moving Average:")
28
  fig = plt.figure(figsize=(12,6))
29
+ plt.plot(df.Close, label="Closing Price")
30
+ plt.plot(moving_avg_100,'red', label="100 Moving Average")
31
+ plt.legend()
32
  st.pyplot(fig)
33
 
34
  moving_avg_200 = df.Close.rolling(200).mean()
35
  st.subheader("Closing Price VS Time Chart With 100Moving Average and 200Moving Average:")
36
  fig = plt.figure(figsize=(12,6))
37
+ plt.plot(df.Close, label="Closing Price")
38
+ plt.plot(moving_avg_100,'red', label="100 Moving Average")
39
+ plt.plot(moving_avg_200,'green', label="200 Moving Average")
40
+ plt.legend()
41
  st.pyplot(fig)