Historique des modifications [retour]
cliquez ici pour masquer/afficher la révision 2

17 Nov '18, 13:33

NeferTiyi's gravatar image

NeferTiyi
2412

Une solution qui semble fonctionner avec les coordonnées symboliques. Les `\phantom{}` servent à avoir des coordonnées uniques, mais sans affecter l'affichage. \documentclass{minimal} \usepackage{tikz} \usepackage{pgfplots} \pgfplotsset{compat=1.14} \begin{document} \begin{tikzpicture} \begin{axis}[ ybar, width=12cm, height=7cm, xlabel={Temps (min)}, ylabel={Pourcentage molaire}, symbolic x coords={ Run1, \phantom{1}2h, \phantom{1}4h, Run2, \phantom{2}2h, \phantom{2}4h }, xtick=data, ] \addplot+ coordinates { (Run1, 0) (\phantom{1}2h, 60) (\phantom{1}4h, 100) (Run2, 0) (\phantom{2}2h, 50) (\phantom{2}4h, 80) }; \end{axis} \end{tikzpicture}\end{tikzpicture} \end{document}
cliquez ici pour masquer/afficher la révision 1

17 Nov '18, 04:26

NeferTiyi's gravatar image

NeferTiyi
2412

Une solution qui semble fonctionner avec les coordonnées symboliques. Les `\phantom{}` servent à avoir des coordonnées uniques, mais sans affecter l'affichage. \begin{tikzpicture} \begin{axis}[ ybar, width=12cm, height=7cm, xlabel={Temps (min)}, ylabel={Pourcentage molaire}, symbolic x coords={ Run1, \phantom{1}2h, \phantom{1}4h, Run2, \phantom{2}2h, \phantom{2}4h }, xtick=data, ] \addplot+ coordinates { (Run1, 0) (\phantom{1}2h, 60) (\phantom{1}4h, 100) (Run2, 0) (\phantom{2}2h, 50) (\phantom{2}4h, 80) }; \end{axis} \end{tikzpicture}