Multichem commited on
Commit
0019427
·
verified ·
1 Parent(s): dca2684

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -5
app.py CHANGED
@@ -704,7 +704,7 @@ with tab3:
704
 
705
  if plot_count == "One":
706
  graph_data = working_data.reindex(['Date', plot_var1],axis="columns")
707
- fig, ax1 = plt.subplots(figsize=(15, 5), layout='tight')
708
 
709
  color = 'tab:blue'
710
  ax1.set_xlabel('Date')
@@ -717,7 +717,7 @@ with tab3:
717
  st.image(buf)
718
  elif plot_count == "Two":
719
  graph_data = working_data.reindex(['Date', plot_var1, plot_var2],axis="columns")
720
- fig, ax1 = plt.subplots(figsize=(15, 5), layout='tight')
721
 
722
  color = 'tab:blue'
723
  ax1.set_xlabel('Date')
@@ -737,13 +737,14 @@ with tab3:
737
  st.image(buf)
738
  elif plot_count == "Three":
739
  graph_data = working_data.reindex(['Date', plot_var1, plot_var2, plot_var3],axis="columns")
740
- fig, ax1 = plt.subplots(figsize=(15, 5), layout='tight')
741
 
742
  color = 'tab:blue'
 
743
  ax1.set_xlabel('Date')
744
- ax1.set_ylabel(str(plot_var1 + "/" + plot_var2), color = color)
745
  ax1.plot(graph_data['Date'], graph_data[plot_var1], color = color)
746
- ax1.plot(graph_data['Date'], graph_data[plot_var2], color = color)
747
  ax1.tick_params(axis ='y', labelcolor = color)
748
 
749
  ax2 = ax1.twinx()
 
704
 
705
  if plot_count == "One":
706
  graph_data = working_data.reindex(['Date', plot_var1],axis="columns")
707
+ fig, ax1 = plt.subplots(figsize=(20, 5), layout='tight')
708
 
709
  color = 'tab:blue'
710
  ax1.set_xlabel('Date')
 
717
  st.image(buf)
718
  elif plot_count == "Two":
719
  graph_data = working_data.reindex(['Date', plot_var1, plot_var2],axis="columns")
720
+ fig, ax1 = plt.subplots(figsize=(20, 5), layout='tight')
721
 
722
  color = 'tab:blue'
723
  ax1.set_xlabel('Date')
 
737
  st.image(buf)
738
  elif plot_count == "Three":
739
  graph_data = working_data.reindex(['Date', plot_var1, plot_var2, plot_var3],axis="columns")
740
+ fig, ax1 = plt.subplots(figsize=(20, 5), layout='tight')
741
 
742
  color = 'tab:blue'
743
+ color2 = 'tab:yellow'
744
  ax1.set_xlabel('Date')
745
+ ax1.set_ylabel(str(plot_var1 + " / " + plot_var2), color = color)
746
  ax1.plot(graph_data['Date'], graph_data[plot_var1], color = color)
747
+ ax1.plot(graph_data['Date'], graph_data[plot_var2], color = color2)
748
  ax1.tick_params(axis ='y', labelcolor = color)
749
 
750
  ax2 = ax1.twinx()