2
0
Fork 0
mirror of https://github.com/MartinThoma/LaTeX-examples.git synced 2025-04-26 06:48:04 +02:00
LaTeX-examples/tikz/csv-2d-point-plot/csv-2d-point-plot.tex
2014-08-16 12:12:59 -04:00

29 lines
1.1 KiB
TeX

\documentclass[varwidth=true, border=2pt]{standalone}
\usepackage[utf8]{inputenc} % this is needed for umlauts
\usepackage[ngerman]{babel} % this is needed for umlauts
\usepackage[T1]{fontenc} % this is needed for correct output of umlauts in pdf
\usepackage[margin=2.5cm]{geometry} %layout
\usepackage{pgfplots}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
width=15cm, height=8cm, % size of the image
xlabel=mean,
ylabel=variance,
visualization depends on={value \thisrow{label} \as \label},
% every node near coord/.append style={font={\tiny}},
nodes near coords={\label},
% nodes near coords align={horizontal}
]
\addplot[scatter,
mark=*,only marks,
% nodes near coords*=\label,
% ... which requires to define a visualization dependency:
% visualization depends on={\thisrow{label} \as \label}
]
table [x=mean, y=variance, col sep=comma] {data.csv};
\end{axis}
\end{tikzpicture}
\end{document}