def draw_networkx_edges(G, pos, node_patches=None,
                        edgelist=None,
                        width=None,
                        edge_color=None,
                        style='solid',
                        alpha=None,
                        edge_cmap=None,
                        edge_vmin=None,
                        edge_vmax=None,
                        ax=None,
                        arrows=True,
                        arrow_style=None,
                        connection_style='arc3',
                        color_weights=False,
                        width_weights=False,
                        **kwds):
    """Draw the edges of the graph G

    This draws only the edges of the graph G.

    Parameters
    ----------
    G : graph
       A networkx graph

    pos : dictionary
       A dictionary with nodes as keys and positions as values.
       If not specified a spring layout positioning will be computed.
       See networkx.layout for functions that compute node positions.

    ax : Matplotlib Axes object, optional
       Draw the graph in the specified Matplotlib axes.

    alpha: float
       The edge transparency (default=1.0)

    width`: float
       Line width of edges (default =1.0)

    edge_color: color string, or array of floats
       Edge color. Can be a single color format string (default='r'),
       or a sequence of colors with the same length as edgelist.
       If numeric values are specified they will be mapped to
       colors using the edge_cmap and edge_vmin,edge_vmax parameters.

    edge_ cmap: Matplotlib colormap
       Colormap for mapping intensities of edges (default=None)

    edge_vmin,edge_vmax: floats
       Minimum and maximum for edge colormap scaling (default=None)

    style: string
       Edge line style (default='solid') (solid|dashed|dotted,dashdot)
    arrow: Bool
       Whether to draw arrows or not for directed graphs
    arrow_style: string
       Arrow style used by matplotlib see FancyArrowPatch
    connection_style: string
       Connection style used by matplotlib, see FancyArrowPatch
    color_weights: Bool
       Whether to color the edges of a graph by their weight if the
       graph has any.
    width_weights: Bool
       Whether to vary the thicknes of an edge by their weight, if the
       graph has any.

    Examples
    --------
    >>> G=nx.dodecahedral_graph()
    >>> edges=nx.draw_networkx_edges(G,pos=nx.spring_layout(G))

    Also see the NetworkX drawing examples at
    http://networkx.lanl.gov/gallery.html

    See Also
    --------
    draw()
    draw_networkx()
    draw_networkx_nodes()
    draw_networkx_labels()
    draw_networkx_edge_labels()

    """
    try:
        import matplotlib
        import matplotlib.pylab as pylab
        import matplotlib.cbook as cb
        from matplotlib.colors import colorConverter,Colormap
        from matplotlib.collections import LineCollection
        import numpy
    except ImportError:
        raise ImportError("Matplotlib required for draw()")
    except __HOLE__:
        print("Matplotlib unable to open display")
        raise

    if ax is None:
        ax=pylab.gca()

    if edgelist is None:
        edgelist=G.edges()

    if not edgelist or len(edgelist)==0: # no edges!
        return None

    # set edge positions
    edge_pos=numpy.asarray([(pos[e[0]],pos[e[1]]) for e in edgelist])


    if width is None and width_weights and is_weighted(G):
        lw = edge_width_weight(G,edgelist)
        if alpha is None:
            alpha = 0.75
    elif width is None:
        lw = {}.fromkeys(edgelist,1.0)
    elif cb.iterable(width):
        try:
            lwvals = list(width.values())
        except:
            lwvals = width
        lw = dict(list(zip(edgelist,lwvals)))
    elif cb.is_scalar(width):
        lw = {}.fromkeys(edgelist,width)
    else:
        raise nx.NetworkXError("Must provide a single scalar value or a list \
                                of values for line width or None")


    if edge_cmap is None:
        edge_cmap = cm.get_cmap(mpl.rcParams['image.cmap'])

    if edge_color is None and color_weights and is_weighted(G):
        edge_color = edge_color_weight(G,edgelist)
        if alpha is None:
            alpha = 0.75
    elif edge_color is None:
        edge_color = 'k'

    e_colors = get_color_dict(edge_color,edgelist,edge_vmin,edge_vmax,edge_cmap)

    edge_patches = {}

    if arrow_style is None:
        if G.is_directed():
            arrow_style = '-|>'
        else:
            arrow_style = '-'

    if node_patches is None:
        node_patches = {}.fromkeys(G.nodes(),None)
    for (u,v) in edgelist:
        edge_patches[(u,v)] = patches.FancyArrowPatch(posA=pos[u],
                                                      posB=pos[v],
                                                      arrowstyle=arrow_style,
                                                      connectionstyle=connection_style,
                                                      patchA=node_patches[u],
                                                      patchB=node_patches[v],
                                                      shrinkA=0.0,
                                                      shrinkB=0.0,
                                                      mutation_scale=20.0,
                                                      alpha=alpha,
                                                      color=e_colors[(u,v)],
                                                      lw = lw[(u,v)],
                                                      linestyle=style,
                                                      zorder=1)
        ax.add_patch(edge_patches[(u,v)])

    # update view
    minx = numpy.amin(numpy.ravel(edge_pos[:,:,0]))
    maxx = numpy.amax(numpy.ravel(edge_pos[:,:,0]))
    miny = numpy.amin(numpy.ravel(edge_pos[:,:,1]))
    maxy = numpy.amax(numpy.ravel(edge_pos[:,:,1]))

    w = maxx-minx
    h = maxy-miny
    padx, pady = 0.05*w, 0.05*h
    corners = (minx-padx, miny-pady), (maxx+padx, maxy+pady)
    ax.update_datalim( corners)
    ax.autoscale_view()

    return edge_patches
dataset/ETHPy150Open calliope-project/calliope/calliope/lib/nx_pylab.py/draw_networkx_edges