Code:
\begin{filecontents}{test.dat}
0 -5
10 0
20 3
30 10
\end{filecontents}
\documentclass[%
a4paper,% Wir verwenden A4 Papier.
oneside,% Einseitiger Druck.
12pt,% Grosse Schrift, besser geeignet für A4.
halfparskip,% Halbe Zeile Abstand zwischen Absätzen.
idxtotoc% Index ins Inhaltsverzeichnis einfügen.
bibliography
]{scrartcl}
\thispagestyle{empty}
\usepackage[latin1]{inputenc} %9
\usepackage[T1]{fontenc}
\usepackage{tikz}
\usetikzlibrary{patterns}
\usetikzlibrary{fit}
\usepackage{pgfplots}
\pgfplotsset{compat=1.3}% <-- moves axis labels near ticklabels (respects tick label widths)
\begin{document}
\begin{tikzpicture}
\begin{axis}
[
width=14cm,height=10cm,
scale only axis,
xmin=0,xmax=50,
ymin=-0.5, ymax=2,
ytick={-0.5,0,...,2.5},
minor y tick num =4,
xlabel={X Achse},
ylabel={großer Abstand},
xlabel near ticks,
ylabel near ticks,
grid=major,
]
\addplot[only marks,mark=square*,blue] file {test.dat};
\end{axis}
%_____________________________________________________________________________________
\begin{axis}[
width=14cm,height=10cm,
scale only axis,
xmin=0,xmax=50,
xtick={0,5,...,50},
axis x line=none,
ymin=0,ymax=75,
ytick={0,15,...,75},
ylabel={kleiner Abstand},
ylabel near ticks,
minor y tick num =4,
axis y line*=right,]
\end{axis}
\end{tikzpicture}
\end{document}
Gruß Daniel
Lesezeichen