Plotting spatially embedded tree graphs #895
Closed
NikDrummond
started this conversation in
General
Replies: 1 comment
-
Hi, if you have a set of vertices and a list of indices then you can use from vedo import *
vertices = np.random.randn(10, 3)
edges = [[0,2], [1,2], [2,3], [3,4], [4,5], [5,6], [6,7]]
lns = Lines(vertices[edges], c="red5", lw=3)
pts = Points(vertices, r=10, c="green5")
labels = pts.labels2d("id", font="Quikhand", scale=1.2)
show(pts, labels, lns, axes=1) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm just wondering how i would go about plotting a tree graph where the points are embedded in 3D space, so have coordinates already. I've seen the DirectedGraph stuff, but I don't want to use a layout. I tried generating a mesh with vertices and edges, and passing that to Mesh, but this just crashes - I assume because the edges are not faces, and a tree has no cycles.
If anyone has any ideas thank you!
Beta Was this translation helpful? Give feedback.
All reactions