ec7719 commited on
Commit
ccd1071
·
1 Parent(s): 730fb31

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -3
app.py CHANGED
@@ -90,14 +90,12 @@ def plot_graph(data, graph_type, x_variables, y_variables):
90
  for y_var in y_variables:
91
  if graph_type == "Scatter":
92
  plt.scatter(data[x_var], data[y_var], label=f"{x_var} vs {y_var}")
93
- st.pyplot()
94
  elif graph_type == "Line":
95
  plt.plot(data[x_var], data[y_var], label=f"{x_var} vs {y_var}")
96
  st.pyplot()
97
  elif graph_type == "Bar":
98
  x = range(len(data))
99
  plt.bar(x, data[y_var], label=y_var)
100
- st.pyplot()
101
 
102
  plt.xlabel("X Values")
103
  plt.ylabel("Y Values")
@@ -133,7 +131,7 @@ def main():
133
  st.write(data)
134
  if st.button("Plot"):
135
  plot_graph(data, graph_type, x_variables, y_variables)
136
- st.pyplot()
137
 
138
  if __name__ == "__main__":
139
  st.set_page_config(page_title="My Analytics App")
 
90
  for y_var in y_variables:
91
  if graph_type == "Scatter":
92
  plt.scatter(data[x_var], data[y_var], label=f"{x_var} vs {y_var}")
 
93
  elif graph_type == "Line":
94
  plt.plot(data[x_var], data[y_var], label=f"{x_var} vs {y_var}")
95
  st.pyplot()
96
  elif graph_type == "Bar":
97
  x = range(len(data))
98
  plt.bar(x, data[y_var], label=y_var)
 
99
 
100
  plt.xlabel("X Values")
101
  plt.ylabel("Y Values")
 
131
  st.write(data)
132
  if st.button("Plot"):
133
  plot_graph(data, graph_type, x_variables, y_variables)
134
+
135
 
136
  if __name__ == "__main__":
137
  st.set_page_config(page_title="My Analytics App")