3
$\begingroup$

Can one modify the default Graph3D[] display to use 3D tubes for the edges? E.g., how could one modify this simple display

Graph3D[{1 <-> 2, 2 <-> 3, 3 <-> 1}]

to use (possibly thick) tubes or cylinders for the edges? I would think EdgeStyle->{?} might accomplish this, but I can't see how to do it. It appears the vertices are true 3D spheres, so this should somehow be possible...

Ultimately I would like a "solid" representation of a 3D graph.

$\endgroup$
  • 2
    $\begingroup$ Something like: Graph3D[{1 <-> 2, 2 <-> 3, 3 <-> 1}, EdgeShapeFunction -> (Tube[#, .02] &)]? $\endgroup$ – Carl Woll Apr 13 '17 at 18:50
  • 1
    $\begingroup$ It does use tubes by default, they are just thin. $\endgroup$ – Szabolcs Apr 13 '17 at 19:22
3
$\begingroup$

Thanks to @CarlWoll:
          Tubes

Graph3D[{1 <-> 2, 2 <-> 3, 3 <-> 1}, 
 EdgeShapeFunction -> (Tube[#, .065] &),
 VertexSize -> Medium]
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.