TransWikia.com

Chemfig picture as node in pgfplots

TeX - LaTeX Asked by Samantha Bernasconi on March 9, 2021

I’m not an expert using LaTeX. I know how to draw the curve in pgfplots, but I don’t have any idea on how to add the Newman projections inside the graph as a node in order to obtain something like what you can see in the picture:

energy levels of various conformations

One Answer

Probably useful as a place to start from:

enter image description here

documentclass{standalone}
usepackage{pgfplots}
pgfplotsset{compat=1.17}

usepackage{chemmacros}
chemsetup{modules=newman}

begin{document} 
begin{tikzpicture}
  begin{axis}[axis x line=bottom, ymin = -20, ymax = 20]
    addplot[mark=none]{x^3};
    node[above] at (1,-15){tinynewman[scale=0.75]{hspace*{3.5mm}ch{CH3},ch{H},ch{H},hspace*{3.5mm}ch{CH3},ch{H},ch{H}}};
    node[above] at (-1,5){tinynewman[scale=0.75](75){hspace*{3.5mm}ch{CH3},ch{H},ch{H},ch{CH3},ch{H},ch{H}}};
  end{axis}
end{tikzpicture}
end{document}

Answered by leandriis on March 9, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP