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
The script examples/drawing/plot_multigraphs.py fails to run: Passing the list connectionstyle to nx.draw_networkx_edges raises an AttributeError: "'list' object has no attribute 'replace'".
Expected Behavior
Similar to the user scripts within that example folder, one would expect a graph to be drawn.
File "plot_multigraphs.py", line 67, in
draw_labeled_multigraph(G, "w", ax)
File "plot_multigraphs.py", line 37, in draw_labeled_multigraph
nx.draw_networkx_edges(
File "venv\Lib\site-packages\networkx\drawing\nx_pylab.py", line 912, in draw_networkx_edges
edge_viz_obj = _draw_networkx_edges_fancy_arrow_patch()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "venv\Lib\site-packages\networkx\drawing\nx_pylab.py", line 778, in _draw_networkx_edges_fancy_arrow_patch
base_connection_style = mpl.patches.ConnectionStyle(connectionstyle)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "venv\Lib\site-packages\matplotlib\patches.py", line 2212, in new
_list = stylename.replace(" ", "").split(",")
^^^^^^^^^^^^^^^^^
AttributeError: 'list' object has no attribute 'replace'
The text was updated successfully, but these errors were encountered:
Yes, multigraph edge drawing was added in #7010 which is not yet included in a released version of NetworkX. This will be available in the next NetworkX version (3.3). The reason you're seeing the discrepancy with the docs is because the gallery example is included in the latest docs (i.e. built from main). To limit documentation to only those features that are in the latest stable release, see https://networkx.org/documentation/stable/
Current Behavior
The script examples/drawing/plot_multigraphs.py fails to run: Passing the list
connectionstyle
tonx.draw_networkx_edges
raises anAttributeError
: "'list' object has no attribute 'replace'".Expected Behavior
Similar to the user scripts within that example folder, one would expect a graph to be drawn.
Steps to Reproduce
Environment
Python version: 3.12.1
NetworkX version: 3.2.1
Matplotlib version: 3.6.0 and 3.8.3
Error Trace
File "plot_multigraphs.py", line 67, in
draw_labeled_multigraph(G, "w", ax)
File "plot_multigraphs.py", line 37, in draw_labeled_multigraph
nx.draw_networkx_edges(
File "venv\Lib\site-packages\networkx\drawing\nx_pylab.py", line 912, in draw_networkx_edges
edge_viz_obj = _draw_networkx_edges_fancy_arrow_patch()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "venv\Lib\site-packages\networkx\drawing\nx_pylab.py", line 778, in _draw_networkx_edges_fancy_arrow_patch
base_connection_style = mpl.patches.ConnectionStyle(connectionstyle)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "venv\Lib\site-packages\matplotlib\patches.py", line 2212, in new
_list = stylename.replace(" ", "").split(",")
^^^^^^^^^^^^^^^^^
AttributeError: 'list' object has no attribute 'replace'
The text was updated successfully, but these errors were encountered: