Varying node glyphs in networkx plot

Hello!

I am just starting with Bokeh and am finding it awesome so far!
I have been trying to create a network graph following the steps on this page → Visualizing network graphs — Bokeh 2.4.2 Documentation. I am using the ‘from_networkx’ function.
It seems the node renderer is set to one glyph in this example. I am wondering if there is a possibility to vary this glyph based on the data (circles for some instances and rectangles for others). Any suggestions?

Hi @stephane_caulis you are correct that only one glyph is configurable for the node renderer. However, you could use a Scatter glyph which can be parameterized by marker type (e.g. you can add a "marker" column to the node renderer data source do drive having different markers for different nodes (or use marker_map to compute a marker type based on some other column).

1 Like

Thank you very much!