Überarbeitungsverlauf[Zurück]
Klicke auf Einblenden/Ausblenden von Überarbeitungen 2

11 Apr '20, 00:17

der_zornige_juergen's gravatar image

der_zornige_juergen
1.3k210

`underbrace` kann ich in der `pgf`-Anleitung nicht finden. Wohl aber `south east` statt `north west` und `south west` statt `north east` und `below` statt `above`. Da allerdings mit: \draw[thick,red,decorate,decoration={brace,amplitude=12pt}] (current axis.south east) -- (current axis.south west) node[midway, below,yshift=-12pt]{Test}; die Klammer noch die Beschriftung überdeckt, empfehle ich zusätzlich eine kleiner Verschiebung, was mit `calc` recht einfach möglich ist: \documentclass{article} \usepackage{pgfplots}% lädt auch tikz \pgfplotsset{compat=newest} \usetikzlibrary{decorations.pathreplacing,calc} \begin{document} \begin{tikzpicture} \begin{axis}[% width=8cm, height=6cm, scale only axis, xmin=0, xmax=936, ymin=0.1, ymax=1, x tick label style={/pgf/number format/1000 sep=} ] \addplot [ color=blue, solid, line width=1.1pt, forget plot ] table[row sep=crcr]{ 1 0.499259843087283\\ 2 0.622898299012219\\ 3 0.674826316443923\\ 4 0.704885883418512\\ 5 0.724743047954077\\ 6 0.739362310108021\\ 7 0.750958468949473\\ 8 0.759691727460227\\ 9 0.767110409997124\\ 10 0.772950627205378\\ 11 0.77821974880641\\ 12 0.782371417630688\\ 13 0.785957199444241\\ 14 0.496642960921615\\ 15 0.60159169468312\\ 16 0.650742962980057\\ 17 0.680446177675622\\ 18 0.700607870533534\\ 19 0.715636489625572\\ 20 0.727415244578511\\ }; \end{axis} \draw[thick,red,decorate,decoration={brace,amplitude=12pt}] ($(current axis.south east)-(0,12pt)$) -- ($(current axis.south west)-(0,12pt)$) node[midway, below,yshift=-12pt,]{Test}; \end{tikzpicture}% \end{document} Zum besseren Verständnis von `current axis` sei auf die `pgfplots`-Anleitung verwiesen. Für verwiesen, für das bessere Verständnis von der `decoration` `brace` und der `calc`-Syntax auf die Anleitung zu TikZ bzw. `pgf`. [![alt text][1]][1] [1]: https://texwelt.de/upfiles/bracebelowplot.png
Klicke auf Einblenden/Ausblenden von Überarbeitungen 1

11 Apr '20, 00:15

der_zornige_juergen's gravatar image

der_zornige_juergen
1.3k210

`underbrace` kann ich in der `pgf`-Anleitung nicht finden. Wohl aber `south east` statt `north west` und `south west` statt `north east` und `below` statt `above`. Da allerdings mit: \draw[thick,red,decorate,decoration={brace,amplitude=12pt}] (current axis.south east) -- (current axis.south west) node[midway, below,yshift=-12pt]{Test}; die Klammer noch die Beschriftung überdeckt, empfehle ich zusätzlich eine kleiner Verschiebung, was mit `calc` recht einfach möglich ist: \documentclass{article} \usepackage{pgfplots}% lädt auch tikz \pgfplotsset{compat=newest} \usetikzlibrary{decorations.pathreplacing,calc} \begin{document} \begin{tikzpicture} \begin{axis}[% width=8cm, height=6cm, scale only axis, xmin=0, xmax=936, ymin=0.1, ymax=1, x tick label style={/pgf/number format/1000 sep=} ] \addplot [ color=blue, solid, line width=1.1pt, forget plot ] table[row sep=crcr]{ 1 0.499259843087283\\ 2 0.622898299012219\\ 3 0.674826316443923\\ 4 0.704885883418512\\ 5 0.724743047954077\\ 6 0.739362310108021\\ 7 0.750958468949473\\ 8 0.759691727460227\\ 9 0.767110409997124\\ 10 0.772950627205378\\ 11 0.77821974880641\\ 12 0.782371417630688\\ 13 0.785957199444241\\ 14 0.496642960921615\\ 15 0.60159169468312\\ 16 0.650742962980057\\ 17 0.680446177675622\\ 18 0.700607870533534\\ 19 0.715636489625572\\ 20 0.727415244578511\\ }; \end{axis} \draw[thick,red,decorate,decoration={brace,amplitude=12pt}] ($(current axis.south east)-(0,12pt)$) -- ($(current axis.south west)-(0,12pt)$) node[midway, below,yshift=-12pt,]{Test}; \end{tikzpicture}% \end{document} Zum besseren Verständnis von `current axis` sei auf die `pgfplots`-Anleitung verwiesen. Für das bessere Verständnis von `decoration` und der `calc`-Syntax auf die Anleitung zu TikZ bzw. `pgf`. [![alt text][1]][1] [1]: https://texwelt.de/upfiles/bracebelowplot.png