asdfasdfqrqwer Claude Opus 4.8 commited on
Commit
e969b86
路
1 Parent(s): 9937165

Plane: start x-axis slightly negative so the x=0 marker is not clipped

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -265,6 +265,8 @@ def diagnosticity_plane(D, R, labels):
265
  sizes.append(13 if len(pairs) == 1 else 17)
266
  head = pairs[0] if len(pairs) == 1 else f"{len(pairs)} pairs at this point:<br>" + "<br>".join(pairs)
267
  txt.append(f"{head}<br>separation {d:.3f} 路 resolve {y:.2f}")
 
 
268
  fig = go.Figure()
269
  fig.add_vline(x=0, line=dict(color=ACCENT, width=1.1, dash="dash"))
270
  fig.add_hline(y=0.5, line=dict(color="#9aa5b1", width=1, dash="dot"))
@@ -279,7 +281,7 @@ def diagnosticity_plane(D, R, labels):
279
  paper_bgcolor="white",
280
  legend=dict(orientation="h", y=1.08, x=0.5, xanchor="center", font=dict(size=11)),
281
  xaxis=dict(title="candidate separation D<sub>ab</sub> (evidence per observation)",
282
- rangemode="tozero", gridcolor="#eef2f6", zeroline=False),
283
  yaxis=dict(title="pairwise resolve (chance 0.50)", range=[0.45, 1.04], gridcolor="#eef2f6"))
284
  return fig
285
 
 
265
  sizes.append(13 if len(pairs) == 1 else 17)
266
  head = pairs[0] if len(pairs) == 1 else f"{len(pairs)} pairs at this point:<br>" + "<br>".join(pairs)
267
  txt.append(f"{head}<br>separation {d:.3f} 路 resolve {y:.2f}")
268
+ xmax = max(xs) if xs else 1.0
269
+ pad = max(0.004, 0.03 * xmax) # start the axis slightly negative so the x=0 marker is not clipped
270
  fig = go.Figure()
271
  fig.add_vline(x=0, line=dict(color=ACCENT, width=1.1, dash="dash"))
272
  fig.add_hline(y=0.5, line=dict(color="#9aa5b1", width=1, dash="dot"))
 
281
  paper_bgcolor="white",
282
  legend=dict(orientation="h", y=1.08, x=0.5, xanchor="center", font=dict(size=11)),
283
  xaxis=dict(title="candidate separation D<sub>ab</sub> (evidence per observation)",
284
+ range=[-pad, xmax + pad], gridcolor="#eef2f6", zeroline=False),
285
  yaxis=dict(title="pairwise resolve (chance 0.50)", range=[0.45, 1.04], gridcolor="#eef2f6"))
286
  return fig
287