Überarbeitungsverlauf[Zurück]
Klicke auf Einblenden/Ausblenden von Überarbeitungen 5
Formatierung korrigiert

13 Apr '18, 14:00

saputello's gravatar image

saputello
11.1k174365

Pgfplots Globale Achsenbeschriftung, Titel, Legende für zwei Diagramme erstellen

> 1. Frage: Wie erstelle ich einen Titel für beide Diagramme? > 2. Frage: Wie erstelle ich eine Beschriftung der Achsen für beide Diagramme, ohne dass diese sich verschieben? >3.Frage: 3. Frage: Wie kann ich die Einträge in der Legende untereinander und die ganze Legende mittig unter den Diagrammen ausrichten? > <!----> \documentclass[chapterprefix=true, 12pt, a4paper, oneside, parskip=half, listof=totoc, bibliography=totoc, numbers=noendperiod]{scrbook} \usepackage{pgfplots} \usepackage{tikz} \begin{figure}[ht] \begin{tikzpicture} \begin{semilogxaxis}[width=8cm,height=8cm,ylabel shift = -1cm, title={Grathöhe $h_{0}$}, xlabel={Zustellung $a_{e}$ in mm}, ylabel={Grathöhe in $\mu$m}, xmin=0, xmax=1.0, ymin=0, ymax=1000, xtick={0,0.02,0.05,0.1,0.2,0.5,1.0}, ytick={0,250,500,750,1000}, log ticks with fixed point, %legend style={at={(0.5,-0.1)},anchor=north}, legend columns=-2, legend entries={Graph1, Graph2}, legend to name=named, ymajorgrids=false, xmajorgrids=false, grid style=dashed, /pgf/number format/.cd, use comma, 1000 sep={}, ] \addplot [color=red, thick, mark=o] coordinates { (0.02,68) (0.05,416) (0.2,441) (0.5,309) (1.0,351) }; \addplot [color=blue, thick, mark=square] coordinates { (0.02,119) (0.05,389) (0.1,408) (0.2,359) (0.5,268) (1.0,283) }; \end{semilogxaxis} \end{tikzpicture} \begin{tikzpicture} \begin{semilogxaxis}[width=8cm,height=8cm,ylabel shift = -1cm, %title={Grathöhe $h_{0}$}, xlabel={Zustellung $a_{e}$ in mm}, %ylabel={Grathöhe in $\mu$m}, xmin=0, xmax=1.0, ymin=0, ymax=1000, xtick={0,0.02,0.05,0.1,0.2,0.5,1.0}, ytick={0,250,500,750,1000}, log ticks with fixed point, legend style={at={(0.5,-0.1)},anchor=north}, ymajorgrids=false, xmajorgrids=false, grid style=dashed, /pgf/number format/.cd, use comma, 1000 sep={}, ] \addplot [color=blue, thick, mark=square] coordinates { (0.02,389) (0.05,672) (0.2,829) (0.5,360) (1.0,776) }; \addplot [color=red, thick, mark=o] coordinates { (0.02,252) (0.05,239) (0.1,322) (0.2,519) (0.5,433) (1.0,479) }; \end{semilogxaxis} \end{tikzpicture} \ref{named} \end{figure} \end{document} [![alt text][1]][1] [1]: https://texwelt.de/wissen/upfiles/2018-04-13_11_03_13-Master_Thesis_-_Online_LaTeX_Editor_ShareLaTeX_3.png
Klicke auf Einblenden/Ausblenden von Überarbeitungen 4

13 Apr '18, 12:44

Christian01's gravatar image

Christian01
11146

Pgfplots Globale Achsenbeschriftung, Titel, Legende für zwei Diagramme erstellenßerstellen

> 1. Frage: Wie erstelle ich einen Titel für beide Diagramme? > 2. Frage: Wie erstelle ich eine Beschriftung der Achsen für beide Diagramme, ohne dass diese sich verschieben? >3.Frage: Wie kann ich die Einträge in der Legende untereinander und die ganze Legende mittig unter den Diagrammen ausrichten? > \documentclass[chapterprefix=true, 12pt, a4paper, oneside, parskip=half, listof=totoc, bibliography=totoc, numbers=noendperiod]{scrbook} \usepackage{pgfplots} \usepackage{tikz} \begin{figure}[ht] \begin{tikzpicture} \begin{semilogxaxis}[width=8cm,height=8cm,ylabel shift = -1cm, title={Grathöhe $h_{0}$}, xlabel={Zustellung $a_{e}$ in mm}, ylabel={Grathöhe in $\mu$m}, xmin=0, xmax=1.0, ymin=0, ymax=1000, xtick={0,0.02,0.05,0.1,0.2,0.5,1.0}, ytick={0,250,500,750,1000}, log ticks with fixed point, %legend style={at={(0.5,-0.1)},anchor=north}, legend columns=-2, legend entries={Graph1, Graph2}, legend to name=named, ymajorgrids=false, xmajorgrids=false, grid style=dashed, /pgf/number format/.cd, use comma, 1000 sep={}, ] \addplot [color=red, thick, mark=o] coordinates { (0.02,68) (0.05,416) (0.2,441) (0.5,309) (1.0,351) }; \addplot [color=blue, thick, mark=square] coordinates { (0.02,119) (0.05,389) (0.1,408) (0.2,359) (0.5,268) (1.0,283) }; \end{semilogxaxis} \end{tikzpicture} \begin{tikzpicture} \begin{semilogxaxis}[width=8cm,height=8cm,ylabel shift = -1cm, %title={Grathöhe $h_{0}$}, xlabel={Zustellung $a_{e}$ in mm}, %ylabel={Grathöhe in $\mu$m}, xmin=0, xmax=1.0, ymin=0, ymax=1000, xtick={0,0.02,0.05,0.1,0.2,0.5,1.0}, ytick={0,250,500,750,1000}, log ticks with fixed point, legend style={at={(0.5,-0.1)},anchor=north}, ymajorgrids=false, xmajorgrids=false, grid style=dashed, /pgf/number format/.cd, use comma, 1000 sep={}, ] \addplot [color=blue, thick, mark=square] coordinates { (0.02,389) (0.05,672) (0.2,829) (0.5,360) (1.0,776) }; \addplot [color=red, thick, mark=o] coordinates { (0.02,252) (0.05,239) (0.1,322) (0.2,519) (0.5,433) (1.0,479) }; \end{semilogxaxis} \end{tikzpicture} \ref{named} \end{figure} \end{document} [![alt text][1]][1] [1]: https://texwelt.de/wissen/upfiles/2018-04-13_11_03_13-Master_Thesis_-_Online_LaTeX_Editor_ShareLaTeX_3.png
Klicke auf Einblenden/Ausblenden von Überarbeitungen 3

13 Apr '18, 12:43

Christian01's gravatar image

Christian01
11146

Klicke auf Einblenden/Ausblenden von Überarbeitungen 2

13 Apr '18, 12:42

Christian01's gravatar image

Christian01
11146

Klicke auf Einblenden/Ausblenden von Überarbeitungen 1

13 Apr '18, 12:41

Christian01's gravatar image

Christian01
11146