1
$\begingroup$

My intention is to put a line to points {0,0,0}, {0,0,1}, and {0,0,2} and make a label "DUMA" above the second pont, {0,0,1}. What I tried is the following:

Graphics3D[{Dashed, Line[{{0, 0, 0}, {0, 0, 1}, {0, 0, 2}}, VertexLabels -> {2 -> "DUMA"}]}]

However, VertexLabels does not work in this context. Could you please help me how to achieve this goal?

$\endgroup$
1
$\begingroup$
reg = MeshRegion[{{0, 0, 0}, {0, 0, 1}, {0, 0, 2}}, Line[{1, 2, 3}], 
   MeshCellLabel -> {{0, 2} -> Style["DUMA", Red, 14]}];
Graphics3D[{Dashed, reg}]

enter image description here

$\endgroup$
1
  • $\begingroup$ Thank you for posting this answer. Is there any way to keep "DUMA" parallel to the line when rotating the figure? $\endgroup$
    – TobiR
    Nov 5 '21 at 22:31

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.