Skip to content

Commit 19af3dd

Browse files
authored
Merge pull request #649 from gdsfactory/fix/648-matplotlib-tuple-label
fix: convert tuple S-param keys to string labels in all_models notebook
2 parents 4801557 + ca0a2d6 commit 19af3dd

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

notebooks/all_models.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@
264264
"f = jnp.linspace(1e9, 25e9, 201)\n",
265265
"S = gamma_0_load(f=f, gamma_0=0.5 + 0.5j, n_ports=2)\n",
266266
"for key in S:\n",
267-
" plt.plot(f / 1e9, abs(S[key]) ** 2, label=key)\n",
267+
" plt.plot(f / 1e9, abs(S[key]) ** 2, label=str(key))\n",
268268
"plt.ylim(-0.05, 1.05)\n",
269269
"plt.xlabel(\"Frequency [GHz]\")\n",
270270
"plt.ylabel(\"S\")\n",

notebooks/src/all_models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@
121121
f = jnp.linspace(1e9, 25e9, 201)
122122
S = gamma_0_load(f=f, gamma_0=0.5 + 0.5j, n_ports=2)
123123
for key in S:
124-
plt.plot(f / 1e9, abs(S[key]) ** 2, label=key)
124+
plt.plot(f / 1e9, abs(S[key]) ** 2, label=str(key))
125125
plt.ylim(-0.05, 1.05)
126126
plt.xlabel("Frequency [GHz]")
127127
plt.ylabel("S")

0 commit comments

Comments
 (0)