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

15 Jul '19, 18:09

samcarter's gravatar image

samcarter
8.6k2817

Cette réponse est basée sur ma réponse de https://texnique.fr/osqa/questions/6218/legende-dun-graphique \documentclass[10pt]{article} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{lmodern} \usepackage[french]{babel} \usepackage[a4paper,left=10mm,right=10mm,top=20mm,bottom=20mm]{geometry} %\usepackage{color} \usepackage[dvipsnames]{xcolor} \usepackage{tikz} \usepackage{graphicx} %\usepackage{picins} \DeclareGraphicsExtensions{.jpg,.pdf,.png} \usepackage{amssymb} \usepackage{amsmath} \usepackage{amsfonts} % \usepackage{siunitx} % \usepackage{multicol} \usepackage{url} \usepackage{setspace} \usepackage{gensymb} \usepackage{mathrsfs} \usepackage{chemfig} \usepackage{pgfplots} \usepackage{siunitx} \usepackage{booktabs} \usepackage{fancyhdr} \pagestyle{fancy} \usepackage{siunitx} \usepackage{filecontents} \begin{filecontents*}{test.txt} X Intensity 1 2 2 4 4 2 8 1 \end{filecontents*} \begin{document} \begingroup \centering \begin{tikzpicture} \begin{axis}[axis x line=bottom,axis y line = left,grid=major, title={Taille des particules de F127a5 dans l'eau à $pH=2$ pour $c_{m} = \SI{20}{g.L^{-1}}$ à différentes températures}, xlabel={taille (nm)}, xmode=log, ylabel={intensité (u.a.)}, ymax=63, mark size=0.5pt, width=1\textwidth, %legend style={at={(0.5,-0.15)},anchor=north}, %legend columns=4, % log ticks with fixed point ] \addplot[purple,thick,smooth,x=X,y=Intensity] table[y expr={\thisrowno{1} + 0}] {test.txt}; \addplot[blue,thick,smooth,x=X,y=Intensity] table[y expr={\thisrowno{1} + 6}] {test.txt}; \addplot[green,thick,smooth,x=X,y=Intensity] table[y expr={\thisrowno{1} + 12}] {test.txt}; \addplot[red,thick,smooth,x=X,y=Intensity] table[y expr={\thisrowno{1} + 18}] {test.txt}; \legend{$T=20\celsius$,$T=30\celsius$,$T=40\celsius$,$T=50\celsius$}; \end{axis} \end{tikzpicture} \endgroup \end{document} ![alt text][1] [1]: https://texnique.fr/osqa/upfiles/Screen_Shot_2019-07-15_at_13.12.51.png
cliquez ici pour masquer/afficher la révision 2

15 Jul '19, 18:07

samcarter's gravatar image

samcarter
8.6k2817

\documentclass[10pt]{article} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{lmodern} \usepackage[french]{babel} \usepackage[a4paper,left=10mm,right=10mm,top=20mm,bottom=20mm]{geometry} %\usepackage{color} \usepackage[dvipsnames]{xcolor} \usepackage{tikz} \usepackage{graphicx} %\usepackage{picins} \DeclareGraphicsExtensions{.jpg,.pdf,.png} \usepackage{amssymb} \usepackage{amsmath} \usepackage{amsfonts} % \usepackage{siunitx} % \usepackage{multicol} \usepackage{url} \usepackage{setspace} \usepackage{gensymb} \usepackage{mathrsfs} \usepackage{chemfig} \usepackage{pgfplots} \usepackage{siunitx} \usepackage{booktabs} \usepackage{fancyhdr} \pagestyle{fancy} \usepackage{siunitx} \usepackage{filecontents} \begin{filecontents*}{test.txt} X Intensity 1 2 2 4 4 2 8 1 \end{filecontents*} \begin{document} \begingroup \centering \begin{tikzpicture} \begin{axis}[axis x line=bottom,axis y line = left,grid=major, title={Taille des particules de F127a5 dans l'eau à $pH=2$ pour $c_{m} = \SI{20}{g.L^{-1}}$ à différentes températures}, xlabel={taille (nm)}, xmode=log, ylabel={intensité (u.a.)}, ymax=63, mark size=0.5pt, width=1\textwidth, %legend style={at={(0.5,-0.15)},anchor=north}, %legend columns=4, % log ticks with fixed point ] \addplot[purple,thick,smooth,x=X,y=Intensity] table[y expr={\thisrowno{1} + 0}] {test.txt}; \addplot[blue,thick,smooth,x=X,y=Intensity] table[y expr={\thisrowno{1} + 6}] {test.txt}; \addplot[green,thick,smooth,x=X,y=Intensity] table[y expr={\thisrowno{1} + 12}] {test.txt}; \addplot[red,thick,smooth,x=X,y=Intensity] table[y expr={\thisrowno{1} + 18}] {test.txt}; \legend{$T=20\celsius$,$T=30\celsius$,$T=40\celsius$,$T=50\celsius$}; \end{axis} \end{tikzpicture} \endgroup \end{document}\end{document} ![alt text][1] [1]: https://texnique.fr/osqa/upfiles/Screen_Shot_2019-07-15_at_13.12.51.png
cliquez ici pour masquer/afficher la révision 1

15 Jul '19, 18:07

samcarter's gravatar image

samcarter
8.6k2817

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

×