sync code
Browse files
code/pimamba/interpret.py
CHANGED
|
@@ -207,10 +207,12 @@ def fig_memory(traces: Dict[str, pd.DataFrame], fname="fig_interpret_memory.png"
|
|
| 207 |
ax.axis("off")
|
| 208 |
continue
|
| 209 |
v = df[col].to_numpy(dtype=float)
|
|
|
|
| 210 |
# plot the raw quantity (each panel has its own units); the title states
|
| 211 |
-
#
|
| 212 |
-
|
| 213 |
-
ax.
|
|
|
|
| 214 |
fontsize=7.5)
|
| 215 |
ax.axvline(0.02, color="0.6", ls=":", lw=0.8)
|
| 216 |
ax.grid(alpha=0.2)
|
|
|
|
| 207 |
ax.axis("off")
|
| 208 |
continue
|
| 209 |
v = df[col].to_numpy(dtype=float)
|
| 210 |
+
eps = df["strain"].to_numpy(dtype=float)
|
| 211 |
# plot the raw quantity (each panel has its own units); the title states
|
| 212 |
+
# the elastic (eps<0.02) -> plastic (eps>0.15) means, the same windows
|
| 213 |
+
# used in the text, so figure and table never disagree.
|
| 214 |
+
ax.plot(eps, v, lw=1.2, color="C0")
|
| 215 |
+
ax.set_title(f"{title}\n{v[eps < 0.02].mean():.4g} → {v[eps > 0.15].mean():.4g}",
|
| 216 |
fontsize=7.5)
|
| 217 |
ax.axvline(0.02, color="0.6", ls=":", lw=0.8)
|
| 218 |
ax.grid(alpha=0.2)
|