You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(notebooks/03-viz)š: fix code formatting and improve matplotlib integration in visualization notebook
- Update marimo version from 0.13.0 to 0.14.8 for compatibility.
- Add hide_code=True to initial app cell for cleaner notebook presentation.
- Fix indentation and remove unnecessary r-string markers from markdown cells for better formatting.
- Add plt.show() after nx.draw calls to ensure matplotlib figures are displayed.
- Remove extra blank lines and trailing whitespace for code cleanliness.
- Update markdown content to improve readability and fix minor typos.
- Add missing import of plt in relevant cells.
- The diagonal is empty: no student voted for themselves as their favourite.
171
-
- The matrix is asymmetric about the diagonal: this is a directed graph!
171
+
- The diagonal is empty: no student voted for themselves as their favourite.
172
+
- The matrix is asymmetric about the diagonal: this is a directed graph!
172
173
173
-
(An undirected graph would be symmetric about the diagonal.)
174
+
(An undirected graph would be symmetric about the diagonal.)
174
175
175
-
You might go on to suggest that there is some clustering happening,
176
-
but without applying a proper clustering algorithm on the adjacency matrix,
177
-
we would be hard-pressed to know for sure.
178
-
After all, we can simply re-order the node ordering along the axes
179
-
to produce a seemingly-random matrix.
180
-
"""
176
+
You might go on to suggest that there is some clustering happening,
177
+
but without applying a proper clustering algorithm on the adjacency matrix,
178
+
we would be hard-pressed to know for sure.
179
+
After all, we can simply re-order the node ordering along the axes
180
+
to produce a seemingly-random matrix.
181
+
"""
181
182
)
182
183
return
183
184
@@ -186,15 +187,15 @@ def _(mo):
186
187
def_(mo):
187
188
mo.md(
188
189
r"""
189
-
## Arc Plot
190
-
191
-
The Arc Plot is another rational graph visualization.
192
-
Here, we line up the nodes along a horizontal axis,
193
-
and draw _arcs_ between nodes if they are connected by an edge.
194
-
We can also optionally group and colour them by some metadata.
195
-
In the case of this student graph,
196
-
we group and colour them by "gender".
197
-
"""
190
+
## Arc Plot
191
+
192
+
The Arc Plot is another rational graph visualization.
193
+
Here, we line up the nodes along a horizontal axis,
194
+
and draw _arcs_ between nodes if they are connected by an edge.
195
+
We can also optionally group and colour them by some metadata.
196
+
In the case of this student graph,
197
+
we group and colour them by "gender".
198
+
"""
198
199
)
199
200
return
200
201
@@ -212,9 +213,9 @@ def _(G, annotate, nv, plt):
212
213
def_(mo):
213
214
mo.md(
214
215
r"""
215
-
The Arc Plot forms the basis of the next visualization,
216
-
the highly popular Circos plot.
217
-
"""
216
+
The Arc Plot forms the basis of the next visualization,
217
+
the highly popular Circos plot.
218
+
"""
218
219
)
219
220
return
220
221
@@ -223,12 +224,12 @@ def _(mo):
223
224
def_(mo):
224
225
mo.md(
225
226
r"""
226
-
## Circos Plot
227
+
## Circos Plot
227
228
228
-
The Circos Plot was developed by [Martin Krzywinski][bccrc] at the BC Cancer Research Center. The `nxviz.CircosPlot` takes inspiration from the original by joining the two ends of the Arc Plot into a circle. Likewise, we can colour and order nodes by node metadata:
229
+
The Circos Plot was developed by [Martin Krzywinski][bccrc] at the BC Cancer Research Center. The `nxviz.CircosPlot` takes inspiration from the original by joining the two ends of the Arc Plot into a circle. Likewise, we can colour and order nodes by node metadata:
0 commit comments