QuantumLearner commited on
Commit
7f0cda0
·
verified ·
1 Parent(s): f0a1818

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -5
app.py CHANGED
@@ -150,7 +150,9 @@ if st.sidebar.button('Run Analysis'):
150
  traceorder='normal',
151
  bgcolor='rgba(255, 255, 255, 0.5)',
152
  bordercolor='rgba(0, 0, 0, 0)'
153
- )
 
 
154
  )
155
  elif column == ('CPIAUCSL', 'CPIAUCSL_PCT'):
156
  # Plot inflation and its percentage change on dual y-axes
@@ -170,7 +172,9 @@ if st.sidebar.button('Run Analysis'):
170
  traceorder='normal',
171
  bgcolor='rgba(255, 255, 255, 0.5)',
172
  bordercolor='rgba(0, 0, 0, 0)'
173
- )
 
 
174
  )
175
  elif column == ('GS10', 'DGS2', 'DGS1MO', 'TB3MS'):
176
  # Plot multiple Treasury rates in the same subplot
@@ -185,7 +189,9 @@ if st.sidebar.button('Run Analysis'):
185
  traceorder='normal',
186
  bgcolor='rgba(255, 255, 255, 0.5)',
187
  bordercolor='rgba(0, 0, 0, 0)'
188
- )
 
 
189
  )
190
  else:
191
  fig.add_trace(go.Scatter(x=combined_data.index, y=combined_data[column], mode='lines', name=key))
@@ -213,7 +219,9 @@ if st.sidebar.button('Run Analysis'):
213
  bgcolor="white",
214
  font_size=12,
215
  font_family="Rockwell"
216
- )
 
 
217
  )
218
  fig.update_xaxes(
219
  showgrid=True,
@@ -233,10 +241,11 @@ if st.sidebar.button('Run Analysis'):
233
 
234
  st.plotly_chart(fig, use_container_width=True)
235
 
 
236
  hide_streamlit_style = """
237
  <style>
238
  #MainMenu {visibility: hidden;}
239
  footer {visibility: hidden;}
240
  </style>
241
  """
242
- st.markdown(hide_streamlit_style, unsafe_allow_html=True)
 
150
  traceorder='normal',
151
  bgcolor='rgba(255, 255, 255, 0.5)',
152
  bordercolor='rgba(0, 0, 0, 0)'
153
+ ),
154
+ height=600, # Adjust height to better fit 16:9 aspect ratio
155
+ margin=dict(l=50, r=50, t=50, b=50)
156
  )
157
  elif column == ('CPIAUCSL', 'CPIAUCSL_PCT'):
158
  # Plot inflation and its percentage change on dual y-axes
 
172
  traceorder='normal',
173
  bgcolor='rgba(255, 255, 255, 0.5)',
174
  bordercolor='rgba(0, 0, 0, 0)'
175
+ ),
176
+ height=600, # Adjust height to better fit 16:9 aspect ratio
177
+ margin=dict(l=50, r=50, t=50, b=50)
178
  )
179
  elif column == ('GS10', 'DGS2', 'DGS1MO', 'TB3MS'):
180
  # Plot multiple Treasury rates in the same subplot
 
189
  traceorder='normal',
190
  bgcolor='rgba(255, 255, 255, 0.5)',
191
  bordercolor='rgba(0, 0, 0, 0)'
192
+ ),
193
+ height=600, # Adjust height to better fit 16:9 aspect ratio
194
+ margin=dict(l=50, r=50, t=50, b=50)
195
  )
196
  else:
197
  fig.add_trace(go.Scatter(x=combined_data.index, y=combined_data[column], mode='lines', name=key))
 
219
  bgcolor="white",
220
  font_size=12,
221
  font_family="Rockwell"
222
+ ),
223
+ height=600, # Adjust height to better fit 16:9 aspect ratio
224
+ margin=dict(l=50, r=50, t=50, b=50)
225
  )
226
  fig.update_xaxes(
227
  showgrid=True,
 
241
 
242
  st.plotly_chart(fig, use_container_width=True)
243
 
244
+ # Hide Streamlit menu and footer
245
  hide_streamlit_style = """
246
  <style>
247
  #MainMenu {visibility: hidden;}
248
  footer {visibility: hidden;}
249
  </style>
250
  """
251
+ st.markdown(hide_streamlit_style, unsafe_allow_html=True)