.. _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) .. only :: html .. container:: sphx-glr-footer .. 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 `_