.. note:: :class: sphx-glr-download-link-note Click :ref:`here ` to download the full example code .. rst-class:: sphx-glr-example-title .. _sphx_glr_gallery_style_attr.py: Grave Documentation ------------------- .. code-block:: python import networkx as nx toy_network = nx.barbell_graph(100, 10) for node, node_attributes in toy_network.nodes(data=True): node['style'] = {'color': 'blue'} plot_the_graph(toy_network, node_style=lambda attrs: attrs['style']) **Total running time of the script:** ( 0 minutes 0.000 seconds) .. _sphx_glr_download_gallery_style_attr.py: .. only :: html .. container:: sphx-glr-footer :class: sphx-glr-footer-example .. container:: sphx-glr-download :download:`Download Python source code: style_attr.py ` .. container:: sphx-glr-download :download:`Download Jupyter notebook: style_attr.ipynb ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_