Node in Legende bei pgfplots aufnehmen

Tabellen und Grafiken erstellen und anordnen


StefanB
Forum-Fortgeschrittener
Forum-Fortgeschrittener
Beiträge: 84
Registriert: Mi 28. Jul 2010, 10:57

Node in Legende bei pgfplots aufnehmen

Beitrag von StefanB »

Hallo,
ich habe hier ein Liniendiagramm. Bei jeder Linie/Plot möchte ich einen bestimmten Punkt hervorheben und das würde ich aktuell mit einer Node machen.

siehe Bsp.:
\documentclass[10pt,a4paper]{article}
\usepackage[latin1]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{pgfplots}
\begin{document}
	\begin{tikzpicture}
		\tikzset{ every pin/.style={fill=yellow!50!white,rectangle,rounded corners=3pt,font=\tiny}, small dot/.style={fill=green,circle,scale=1.1}}
	\begin{axis}[
	%width=0.9\textwidth,height=0.9\textheight,
	width=0.9\textwidth,
	title={Test},
	xlabel={Stichprobe},
	ylabel={richtige Antworten in \%},
	ymin=0, ymax=100, xmin=1, xmax=16,enlarge x limits=0.01,legend entries={Schülerin A, NODE}, legend pos=south east, line width =1.5pt]	
\addplot {5*x};
\node[small dot] at (axis cs:7,70.1754){};

	\end{axis}
	\end{tikzpicture}
\end{document}
Das Problem ist nur, dass ich diese Node nicht in der Legene anzeigen kann.
Gibt es da eine Möglichkeit, dass die Node in der Legene angezeigt wird bzw. dass ich die Punkte anders hervorhebe?

Beobachter

Ansatz

Beitrag von Beobachter »

Ersetze die Zeile mit \node durch das hier.
\addplot[green,only marks,mark size=4pt] coordinates {(7,70.1754)};
Alles Weitere ist in der Anleitung zu finden (und der von »PGF/TikZ«).

StefanB
Forum-Fortgeschrittener
Forum-Fortgeschrittener
Beiträge: 84
Registriert: Mi 28. Jul 2010, 10:57

Beitrag von StefanB »

danke, geht.

Antworten