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

07 Oct '17, 14:27

touhami's gravatar image

touhami
9.8k410

**1** On peut utiliser plusieurs fichiers pour importer les données \documentclass{article} \usepackage{pgfplots} \pgfplotsset{compat = 1.15} \begin{filecontents}{mtfilefoo.txt} 1 1 2 2 3 3 \end{filecontents} \begin{filecontents}{mtfilebar.txt} 1 1 2 0 3 1 \end{filecontents} \begin{document} \begin{tikzpicture}[scale=0.75] \begin{axis}[ xlabel=concentration (g.L$^{-1}$), ylabel=tension de surface (mN.m$^{-1}$), grid=major ] \addplot+[mark=none,smooth] table {mtfilefoo.txt}; \addplot+[mark=none,smooth] table {mtfilebar.txt}; \end{axis} \end{tikzpicture} \end{document} **2** Comme on peut utiliser un seule seul fichier en spécifiant les colonnes \documentclass{article} \usepackage{pgfplots} \pgfplotsset{compat = 1.15} \begin{filecontents}{mtfile.txt} x f(x) g(x) h(x) 1 1 0 2 2 2 1 1 3 3 0 2 \end{filecontents} \begin{document} \begin{tikzpicture}[scale=0.75] \begin{axis}[ xlabel=concentration (g.L$^{-1}$), ylabel=tension de surface (mN.m$^{-1}$), grid=major ] \addplot+[mark=none,smooth] table [x=x, y=f(x)] {mtfile.txt}; \addplot+[mark=none,smooth] table [x=x, y=g(x)] {mtfile.txt}; \addplot+[mark=none,smooth] table [x=x, y=h(x)] {mtfile.txt}; \end{axis} \end{tikzpicture} \end{document}
cliquez ici pour masquer/afficher la révision 1

07 Oct '17, 12:40

touhami's gravatar image

touhami
9.8k410

On peut utiliser plusieurs fichiers pour importer les données \documentclass{article} \usepackage{pgfplots} \pgfplotsset{compat = 1.15} \begin{filecontents}{mtfilefoo.txt} 1 1 2 2 3 3 \end{filecontents} \begin{filecontents}{mtfilebar.txt} 1 1 2 0 3 1 \end{filecontents} \begin{document} \begin{tikzpicture}[scale=0.75] \begin{axis}[ xlabel=concentration (g.L$^{-1}$), ylabel=tension de surface (mN.m$^{-1}$), grid=major ] \addplot+[mark=none,smooth] table {mtfilefoo.txt}; \addplot+[mark=none,smooth] table {mtfilebar.txt}; \end{axis} \end{tikzpicture} \end{document} Comme on peut utiliser un seule fichier en spécifiant les colonnes \documentclass{article} \usepackage{pgfplots} \pgfplotsset{compat = 1.15} \begin{filecontents}{mtfile.txt} x f(x) g(x) h(x) 1 1 0 2 2 2 1 1 3 3 0 2 \end{filecontents} \begin{document} \begin{tikzpicture}[scale=0.75] \begin{axis}[ xlabel=concentration (g.L$^{-1}$), ylabel=tension de surface (mN.m$^{-1}$), grid=major ] \addplot+[mark=none,smooth] table [x=x, y=f(x)] {mtfile.txt}; \addplot+[mark=none,smooth] table [x=x, y=g(x)] {mtfile.txt}; \addplot+[mark=none,smooth] table [x=x, y=h(x)] {mtfile.txt}; \end{axis} \end{tikzpicture} \end{document}

C'est votre première visite ici ? Consultez la FAQ !

×