Skip to content

Commit 76844d4

Browse files
lmeyerovclaude
andcommitted
docs: update plot_static examples to use auto-display
Remove explicit SVG() wrapper from examples - plot_static now auto-displays inline in Jupyter notebooks. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent 41c5e4a commit 76844d4

File tree

2 files changed

+6
-10
lines changed

2 files changed

+6
-10
lines changed

docs/source/10min.rst

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -208,14 +208,12 @@ For example, GraphViz layouts is known for its high quality for laying out small
208208
Static Graphviz render
209209
----------------------
210210

211-
When you need a quick static image (e.g., docs/notebooks), reuse the Graphviz layout. ``plot_static`` returns bytes you can embed or save:
211+
When you need a quick static image (e.g., docs/notebooks), reuse the Graphviz layout. ``plot_static`` auto-displays in Jupyter and returns bytes you can save:
212212

213213
.. code-block:: python
214214
215-
# Reuse bound x/y if present; otherwise Graphviz lays out the graph
216-
svg = g1.plot_static(format='svg', max_nodes=200, max_edges=400)
217-
from IPython.display import SVG
218-
SVG(svg)
215+
# Auto-displays inline in Jupyter; reuses x/y if present
216+
g1.plot_static(format='svg', max_nodes=200, max_edges=400)
219217
220218
.. graphviz::
221219

docs/source/visualization/10min.rst

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -116,14 +116,12 @@ PyGraphistry's :ref:`Layout catalog <layout-catalog>` provides many options, cov
116116
Static Graphviz render (for docs/notebooks)
117117
-------------------------------------------
118118

119-
When you need a quick static image without an interactive client, render directly with Graphviz. ``plot_static`` emits bytes that you can save or embed inline:
119+
When you need a quick static image without an interactive client, render directly with Graphviz. ``plot_static`` auto-displays in Jupyter and returns bytes that you can save:
120120

121121
.. code-block:: python
122122
123-
from IPython.display import SVG
124-
125-
svg = g.plot_static(format='svg', max_nodes=200, max_edges=400)
126-
SVG(svg)
123+
# Auto-displays inline in Jupyter notebooks
124+
g.plot_static(format='svg', max_nodes=200, max_edges=400)
127125
128126
Text-only outputs
129127
-----------------

0 commit comments

Comments
 (0)