3
$\begingroup$

I know it is possible to view .xyz files of coordinates in Mathematica. I tried to write some text on a specific atom using Text, but I was not successful. How can i do that? Thanks for the help in advance.

$\endgroup$
8
$\begingroup$

Text should work. For example

{g, n, p} = Import["ExampleData/caffeine.xyz", 
    {{"Graphics3D", "VertexTypes", "VertexCoordinates"}}];

Show[g, Graphics3D[MapThread[Text, {n, p}]]]

enter image description here

$\endgroup$
  • 1
    $\begingroup$ OP can also style the text: MapThread[Style[Text[##], 12, Bold, White] &, {n, p}] $\endgroup$ – Bob Hanlon Dec 19 '15 at 21: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.