UCS2014 commited on
Commit
2b46911
·
verified ·
1 Parent(s): 9c36cf3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +33 -25
app.py CHANGED
@@ -36,12 +36,12 @@ CROSS_NUDGE = 0.02 # push cross-plot to the RIGHT inside its band
36
  # =========================
37
  st.set_page_config(page_title="ST_GeoMech_UCS", page_icon="logo.png", layout="wide")
38
  st.markdown("""
39
- <style>
40
- /* Hide the drag and drop text helper */
41
- section[data-testid="stFileUploader"] > div > div:first-child {
42
- display: none;
43
- }
44
- </style>
45
  """, unsafe_allow_html=True)
46
  st.markdown("<style>header, footer{visibility:hidden !important;}</style>", unsafe_allow_html=True)
47
  st.markdown(
@@ -210,26 +210,34 @@ def cross_plot(actual, pred):
210
  dragmode=False
211
  )
212
 
213
- fig.update_xaxes(
214
- title_text="<b>Actual UCS (psi)</b>",
215
- title_font=dict(size=18, family="Arial", color="#000"),
216
- range=[fixed_min, fixed_max],
217
- tick0=tick_start, dtick=tick_spacing,
218
- ticks="outside", tickformat=",.0f",
219
- showline=True, linewidth=1.2, linecolor="#444", mirror=True,
220
- showgrid=True, gridcolor="rgba(0,0,0,0.12)", automargin=True
221
- )
 
 
 
 
 
222
 
223
- fig.update_yaxes(
224
- title_text="<b>Predicted UCS (psi)</b>",
225
- title_font=dict(size=18, family="Arial", color="#000"),
226
- range=[fixed_min, fixed_max],
227
- tick0=tick_start, dtick=tick_spacing,
228
- ticks="outside", tickformat=",.0f",
229
- showline=True, linewidth=1.2, linecolor="#444", mirror=True,
230
- showgrid=True, gridcolor="rgba(0,0,0,0.12)",
231
- scaleanchor="x", scaleratio=1, automargin=True
232
- )
 
 
 
233
 
234
  return fig
235
 
 
36
  # =========================
37
  st.set_page_config(page_title="ST_GeoMech_UCS", page_icon="logo.png", layout="wide")
38
  st.markdown("""
39
+ <style>
40
+ /* Hides 'Drag and drop file here' and file size note */
41
+ section[data-testid="stFileUploader"] div[data-testid="stMarkdownContainer"] {
42
+ display: none !important;
43
+ }
44
+ </style>
45
  """, unsafe_allow_html=True)
46
  st.markdown("<style>header, footer{visibility:hidden !important;}</style>", unsafe_allow_html=True)
47
  st.markdown(
 
210
  dragmode=False
211
  )
212
 
213
+ fig.update_xaxes(
214
+ title_text="<b>Actual UCS (psi)</b>",
215
+ title_font=dict(size=18, family="Arial", color="#000"),
216
+ range=[6000, 10000],
217
+ tick0=6000,
218
+ dtick=500,
219
+ ticks="outside",
220
+ tickformat=",.0f",
221
+ showline=True, linewidth=1.2, linecolor="#444", mirror=True,
222
+ showgrid=True, gridcolor="rgba(0,0,0,0.12)",
223
+ constrain="domain", # ensures no stretching
224
+ scaleanchor="y", scaleratio=1, # enforce 1:1 with y-axis
225
+ automargin=False
226
+ )
227
 
228
+ fig.update_yaxes(
229
+ title_text="<b>Predicted UCS (psi)</b>",
230
+ title_font=dict(size=18, family="Arial", color="#000"),
231
+ range=[6000, 10000],
232
+ tick0=6000,
233
+ dtick=500,
234
+ ticks="outside",
235
+ tickformat=",.0f",
236
+ showline=True, linewidth=1.2, linecolor="#444", mirror=True,
237
+ showgrid=True, gridcolor="rgba(0,0,0,0.12)",
238
+ constrain="domain", # ensures no stretching
239
+ automargin=False
240
+ )
241
 
242
  return fig
243