\documentclass[11pt, a4paper, bibliography=totocnumbered, listof=nochaptergap, DIV=10]{scrreprt} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage[ngerman]{babel} \usepackage{graphicx} \usepackage{subfig} \usepackage{amsmath} \usepackage{float} \usepackage{xcolor} \usepackage{multicol,multirow} \usepackage{tabularx} \usepackage{pgfplots} \pgfplotsset{compat=newest} \usepackage{geometry} \geometry{a4paper, top=15mm, bottom=30mm} \begin{document} \begin{figure}[h] \centering \begin{tikzpicture} \begin{axis} [ width=12.0cm, height=9.0cm, xmin=0, xmax=105, ymin=0, ymax =300000, samples=1000, axis y line=center, axis x line=middle, xlabel={Geschwindigkeitsindex}, ylabel={Flaschenanzahl in 24h}, xlabel style={at={(xticklabel cs:0.5)},anchor=north}, ylabel style={at={(yticklabel cs:0.5)},anchor=south,,rotate=90}, grid=both, scaled ticks=false, ticklabel style={/pgf/number format/1000 sep=}, ticklabel style={/pgf/number format/.cd,fixed}, extra y ticks={27312.0, 281880.0}, legend style={at={(1,0.5)},yshift=0.6cm,anchor=north west,nodes=right} ] \addplot [] plot[error bars/.cd, y dir=both, y explicit] coordinates { (10,27312) +- (0,365) (20,53952) +- (0,809) (30,81000) +- (0,1215) (40,107904) +- (0,1619) (50,132720) +- (0,2066) (60,157320) +- (0,2360) (70,185040) +- (0,2776) (80,212280) +- (0,3184) (90,238224) +- (0,3574) (100,281880)+- (0,4228) }; \addlegendentry{Messwerte} \end{axis} \end{tikzpicture} \caption{Geschwindigkeit - Flaschenanzahl} \label{Geschwindigkeit - Flaschenanzahl} \end{figure} \end{document}
Einen Plot einkreisen
Einen Plot einkreisen
In einem Diagramm möchte ich einen Plot mit einem Kreis hervorheben, den Plot (40,107904) +- (0,1619).
MfG
\documentclass[border=5pt]{standalone} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage[ngerman]{babel} \usepackage[locale=DE]{siunitx} \usepackage{pgfplots} \pgfplotsset{ compat=newest, /pgf/number format/.cd, fixed, 1000 sep=\thinspace, min exponent for 1000 sep=4 } \begin{document} \begin{tikzpicture} \begin{axis} [ width=12.0cm, height=9.0cm, xmin=0, xmax=105, ymin=0, ymax=300000, samples=1000, axis y line=center, axis x line=middle, xlabel={Geschwindigkeitsindex}, ylabel={Flaschenanzahl in \SI{24}{\hour}}, xlabel style={at={(xticklabel cs:0.5)},anchor=north}, ylabel style={at={(yticklabel cs:0.5)},anchor=south,rotate=90}, grid=both, scaled ticks=false, extra y ticks={27312.0, 281880.0}, legend style={at={(1,0.5)},yshift=0.6cm,anchor=north west,nodes=right} ] \addplot [] plot[error bars/.cd, y dir=both, y explicit] coordinates { (10,27312) +- (0,365) (20,53952) +- (0,809) (30,81000) +- (0,1215) (40,107904) +- (0,1619) (50,132720) +- (0,2066) (60,157320) +- (0,2360) (70,185040) +- (0,2776) (80,212280) +- (0,3184) (90,238224) +- (0,3574) (100,281880)+- (0,4228) }; \addlegendentry{Messwerte} \draw (40,107904) circle (3mm);% <- eingefügt \end{axis} \end{tikzpicture} \end{document}