Noch ist das Problem mit den Leerzeichen zumind. noch in deinem Beispiel-Code drin:
Code:
(Instanz 1, 46) ( Instanz 2, 515) (Instanz 3, 109)
Das führt zumind. bei mir zu einem Fehler.
Zu deinem anderen Problem habe ich hier eine vielleicht auch für dich brauchbare Lösung gefunden. Bsp.:
Code:
\documentclass{standalone}
\usepackage{pgfplots}
\pgfplotsset{
jitter/.style={
x filter/.code={\pgfmathparse{\pgfmathresult+rnd*#1}}
},
jitter/.default=0.1
}
\begin{document}
\begin{tikzpicture}
\begin{semilogyaxis}
[
xlabel={Instanzen},
ylabel={Laufzeit Algorithmus in ms},
ymin=0,ymax=1000,
xtick = data,
yticklabel={%
\pgfplotsset{/pgf/fpu}% <-- erweiterter zahlenbereich
\pgfmathparse{exp(\tick)}% exponentiere den exponent
\pgfmathprintnumber[fixed]{\pgfmathresult}% formatiere die zahl
},
y tick label style={/pgf/number format/use comma, /pgf/number format/1000 sep={.}},
x tick label style={rotate=45,anchor=east},
legend pos=north west, %,legend columns=-1},
symbolic x coords={Instanz 1, Instanz 2, Instanz 3}, jitter=0.2
]
\addplot[color=green, draw=black, mark=square*,only marks]coordinates{
(Instanz 1, 46) ( Instanz 2, 515) (Instanz 3, 109)
};
\addlegendentry{Algo 1}
\addplot[color=blue, draw=black, mark=triangle*,only marks] coordinates{
(Instanz 1, 31) (Instanz 2, 421) (Instanz 3, 94)
};
\addlegendentry{Algo 2}
\addplot[color=yellow, draw=black, mark=square*,only marks] coordinates{
(Instanz 1, 31) (Instanz 2, 187) (Instanz 3, 62)
};
\addlegendentry{Algo 3}
\addplot[color=magenta, draw=black, mark=triangle*,only marks] coordinates{
(Instanz 1, 31) (Instanz 2, 140) (Instanz 3, 47)
};
\addlegendentry{Algo 4}
\end{semilogyaxis}
\end{tikzpicture}
\end{document}
Lesezeichen