# Edges plotted with graphplot, which should not be

**URL:** <https://discourse.julialang.org/t/edges-plotted-with-graphplot-which-should-not-be/42386>\
**Category:** New to Julia\
**Created:** [July 1, 2020, 5:02pm UTC](https://discourse.julialang.org/t/edges-plotted-with-graphplot-which-should-not-be/42386 "2020-07-01T17:02:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![erlebach](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/erlebach/32/12973_2.png) [@erlebach](https://discourse.julialang.org/u/erlebach)\
**Post date:** [July 1, 2020, 5:02pm UTC](https://discourse.julialang.org/t/edges-plotted-with-graphplot-which-should-not-be/42386/1 "2020-07-01T17:02:41Z")

</div>

I am successfully interacting with a 3D graph created with LightGraphs, but `plotly` backend is rather slow when I have 2000 nodes and 10,000 edges. It might be slow because the `curvature` argument creates intermediate points on an edge modeled by a spline. However, there is no acceleration when curvature is zero, and yet, a straight line is sufficient. That is not reasonable. Also, when curvature is low, an edge could be modeled with a reduced number of intermediate nodes. So I created a graph with a single edge, and ran the following code (notice the `x`,`y`,`z` arguments to graphplot.

```julia
using LightGraphs
using GraphRecipes
import Plots
Plots.plotly()

function plotGraph()
    graph = SimpleGraph(20, 1)
    nb_nodes = nv(graph)
    xx = rand(nb_nodes)
    yy = rand(nb_nodes)
    zz = rand(nb_nodes)
    p = graphplot(graph, dim=3, curvature=0, x=xx, y=yy, z=zz)
end

p = plotGraph()

```

The graph has edges associated with it. How is that possible? It is as if the position matrices are being used to create edges.

Any ideas?
