.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "gallery/style/plot_vertexmarkers.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code. .. rst-class:: sphx-glr-example-title .. _sphx_glr_gallery_style_plot_vertexmarkers.py: Vertex markers ============== This example shows various kinds of vertex markers that can be used in `iplotx`. .. GENERATED FROM PYTHON SOURCE LINES 7-50 .. image-sg:: /gallery/style/images/sphx_glr_plot_vertexmarkers_001.png :alt: plot vertexmarkers :srcset: /gallery/style/images/sphx_glr_plot_vertexmarkers_001.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out .. code-block:: none [] | .. code-block:: Python import igraph as ig import numpy as np import iplotx as ipx markers = ["o", "s", "^", "v", "<", ">", "d", "e", "p", "h", "8", "*"] n = len(markers) g = ig.Graph( edges=[(0, i + 1) for i in range(n)], directed=False, ) # Create star layout layout = {i + 1: (np.cos(2 * np.pi / n * i), np.sin(2 * np.pi / n * i)) for i in range(n)} layout[0] = (0, 0) # Colors colors = [ "k", "#8dd3c7", "#ffffb3", "#bebada", "#fb8072", "#80b1d3", "#fdb462", "#b3de69", "#fccde5", "#bf5b17", "#666666", "#000000", "#bbbbbb", ] colors = {i: colors[i] for i in range(n + 1)} ipx.network( g, layout=layout, vertex_marker=markers, vertex_size={i: 20 * bool(i) for i in range(n + 1)}, vertex_facecolor=colors, vertex_edgecolor="black", aspect=1, ) .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.036 seconds) .. _sphx_glr_download_gallery_style_plot_vertexmarkers.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_vertexmarkers.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_vertexmarkers.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plot_vertexmarkers.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_