PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : pgf und/oder tikz - schönes Diagramm - ohne Legende?!



Barny.G
12-02-2012, 14:55
Hallo liebe Leute,

ein kleines Prob aus dem Bereich der schönen Diagramme. Ich habe mit "pgfplots" mir aus dem Matlab ein pgf-Diagramm erstellt und es in ein "gnaz normales LaTeX-Dokument eingebunden. Soweit hat das einwandfrei funktioniert. Nun würde ich gern selber noch eine Legende unter das Diagramm basteln, doch leider weiß ich nicht, wie ich die Koordinate des x-labels auslesen kann.

Mit dieser möchte ich mir dann mit "below" usw. die zugehörige Legende bauen.

Wahrscheinlich geht das auch einfacher?

Hier (m)ein Beispiel:

\documentclass{article}
\usepackage{geometry}
\geometry{a4paper,left=35mm,right=28mm, top=25mm, bottom=27mm}

\usepackage[latin1]{inputenc}
\usepackage{amsmath}
%------------- [Beginn] --------------------------------
\usepackage{tikz}
\usetikzlibrary{shapes,arrows,positioning,calc,fit ,intersections}
\usetikzlibrary{arrows}
\usepgflibrary{arrows}

\usepackage{pgfplots} % für schöne MatLab-Grafiken
\newcommand{\pgfwidth}{.8\linewidth}
\newcommand{\pgfheight}{.6\linewidth}
%------------- [Ende] ----------------------------------
\begin{document}
\pagestyle{empty}

\pgfplotsset{compat=1.3}
\begin{tikzpicture}[scale=0.84]%
\begin{axis}[
legend columns=1,
legend cell align=left,
tick pos=left,
tick align=inside,
title={Konfidenzellipse 90\%, Student-t-Verteilung},
xlabel={x-Wert [m]},
ylabel={y-Wert [m]},
xmin=-0.1,
xmax=0.1,
ymin=-0.1,
ymax=0.1,
xtick={-0.1,-0.05,0,0.05,0.1},
ytick={-0.1,-0.05,0,0.05,0.1},
width=\pgfwidth,
%height=\pgfheight,
axis equal,
]
%
\addplot[
smooth,
line width=.5pt,
color=red,
solid]
plot coordinates {
(-0.070412, -0.009249)
(-0.070046, -0.011759)
(-0.069612, -0.014258)
(-0.069109, -0.016743)
(-0.068538, -0.019211)
(-0.067899, -0.021660)
(-0.067194, -0.024087)
(-0.066422, -0.026491)
(-0.065584, -0.028869)
(-0.064682, -0.031219)
(-0.063715, -0.033537)
(-0.062686, -0.035823)
(-0.061595, -0.038073)
(-0.060444, -0.040285)
(-0.059232, -0.042458)
(-0.057963, -0.044589)
(-0.056636, -0.046676)
(-0.055253, -0.048716)
(-0.053815, -0.050709)
(-0.052325, -0.052652)
(-0.050783, -0.054542)
(-0.049190, -0.056379)
(-0.047549, -0.058160)
(-0.045862, -0.059884)
(-0.044129, -0.061549)
(-0.042352, -0.063153)
(-0.040534, -0.064695)
(-0.038675, -0.066173)
(-0.036779, -0.067585)
(-0.034846, -0.068931)
(-0.032879, -0.070209)
(-0.030879, -0.071417)
(-0.028849, -0.072555)
(-0.026790, -0.073622)
(-0.024705, -0.074615)
(-0.022596, -0.075535)
(-0.020464, -0.076381)
(-0.018312, -0.077151)
(-0.016142, -0.077845)
(-0.013956, -0.078463)
(-0.011756, -0.079002)
(-0.009545, -0.079464)
(-0.007324, -0.079848)
(-0.005096, -0.080152)
(-0.002863, -0.080378)
(-0.000627, -0.080524)
(0.001609, -0.080591)
(0.003844, -0.080578)
(0.006075, -0.080486)
(0.008300, -0.080314)
(0.010517, -0.080063)
(0.012723, -0.079733)
(0.014917, -0.079324)
(0.017096, -0.078837)
(0.019259, -0.078272)
(0.021402, -0.077630)
(0.023524, -0.076912)
(0.025623, -0.076117)
(0.027697, -0.075247)
(0.029743, -0.074303)
(0.031760, -0.073286)
(0.033746, -0.072197)
(0.035698, -0.071036)
(0.037616, -0.069805)
(0.039496, -0.068505)
(0.041337, -0.067138)
(0.043137, -0.065704)
(0.044895, -0.064205)
(0.046608, -0.062643)
(0.048275, -0.061020)
(0.049895, -0.059336)
(0.051466, -0.057593)
(0.052985, -0.055794)
(0.054453, -0.053940)
(0.055866, -0.052032)
(0.057225, -0.050073)
(0.058527, -0.048065)
(0.059771, -0.046009)
(0.060957, -0.043907)
(0.062082, -0.041763)
(0.063146, -0.039577)
(0.064147, -0.037352)
(0.065086, -0.035091)
(0.065960, -0.032794)
(0.066769, -0.030466)
(0.067512, -0.028107)
(0.068188, -0.025720)
(0.068797, -0.023308)
(0.069338, -0.020874)
(0.069811, -0.018418)
(0.070215, -0.015944)
(0.070550, -0.013455)
(0.070815, -0.010952)
(0.071010, -0.008439)
(0.071135, -0.005917)
(0.071190, -0.003389)
(0.071174, -0.000858)
(0.071089, 0.001673)
(0.070933, 0.004204)
(0.070707, 0.006730)
(0.070412, 0.009249)
(0.070046, 0.011759)
(0.069612, 0.014258)
(0.069109, 0.016743)
(0.068538, 0.019211)
(0.067899, 0.021660)
(0.067194, 0.024087)
(0.066422, 0.026491)
(0.065584, 0.028869)
(0.064682, 0.031219)
(0.063715, 0.033537)
(0.062686, 0.035823)
(0.061595, 0.038073)
(0.060444, 0.040285)
(0.059232, 0.042458)
(0.057963, 0.044589)
(0.056636, 0.046676)
(0.055253, 0.048716)
(0.053815, 0.050709)
(0.052325, 0.052652)
(0.050783, 0.054542)
(0.049190, 0.056379)
(0.047549, 0.058160)
(0.045862, 0.059884)
(0.044129, 0.061549)
(0.042352, 0.063153)
(0.040534, 0.064695)
(0.038675, 0.066173)
(0.036779, 0.067585)
(0.034846, 0.068931)
(0.032879, 0.070209)
(0.030879, 0.071417)
(0.028849, 0.072555)
(0.026790, 0.073622)
(0.024705, 0.074615)
(0.022596, 0.075535)
(0.020464, 0.076381)
(0.018312, 0.077151)
(0.016142, 0.077845)
(0.013956, 0.078463)
(0.011756, 0.079002)
(0.009545, 0.079464)
(0.007324, 0.079848)
(0.005096, 0.080152)
(0.002863, 0.080378)
(0.000627, 0.080524)
(-0.001609, 0.080591)
(-0.003844, 0.080578)
(-0.006075, 0.080486)
(-0.008300, 0.080314)
(-0.010517, 0.080063)
(-0.012723, 0.079733)
(-0.014917, 0.079324)
(-0.017096, 0.078837)
(-0.019259, 0.078272)
(-0.021402, 0.077630)
(-0.023524, 0.076912)
(-0.025623, 0.076117)
(-0.027697, 0.075247)
(-0.029743, 0.074303)
(-0.031760, 0.073286)
(-0.033746, 0.072197)
(-0.035698, 0.071036)
(-0.037616, 0.069805)
(-0.039496, 0.068505)
(-0.041337, 0.067138)
(-0.043137, 0.065704)
(-0.044895, 0.064205)
(-0.046608, 0.062643)
(-0.048275, 0.061020)
(-0.049895, 0.059336)
(-0.051466, 0.057593)
(-0.052985, 0.055794)
(-0.054453, 0.053940)
(-0.055866, 0.052032)
(-0.057225, 0.050073)
(-0.058527, 0.048065)
(-0.059771, 0.046009)
(-0.060957, 0.043907)
(-0.062082, 0.041763)
(-0.063146, 0.039577)
(-0.064147, 0.037352)
(-0.065086, 0.035091)
(-0.065960, 0.032794)
(-0.066769, 0.030466)
(-0.067512, 0.028107)
(-0.068188, 0.025720)
(-0.068797, 0.023308)
(-0.069338, 0.020874)
(-0.069811, 0.018418)
(-0.070215, 0.015944)
(-0.070550, 0.013455)
(-0.070815, 0.010952)
(-0.071010, 0.008439)
(-0.071135, 0.005917)
(-0.071190, 0.003389)
(-0.071174, 0.000858)
(-0.071089, -0.001673)
(-0.070933, -0.004204)
(-0.070707, -0.006730)
(-0.070412, -0.009249)
};
\addplot[
smooth,
line width=.5pt,
color=black,
only marks,
mark=o,
mark options={solid}]
plot coordinates {
(0.000000, 0.000000)
};
\addplot[
smooth,
line width=.5pt,
color={rgb,255:red,153;green,204;blue,127},
only marks,
mark=o,
mark options={solid}]
plot coordinates {
(0.048838, 0.022956)
};
\addplot[
smooth,
line width=.5pt,
color=blue,
dashed]
plot coordinates {
(0.058667, 0.000000)
(0.058638, 0.001843)
(0.058551, 0.003684)
(0.058406, 0.005521)
(0.058204, 0.007353)
(0.057944, 0.009177)
(0.057628, 0.010993)
(0.057254, 0.012798)
(0.056824, 0.014590)
(0.056337, 0.016367)
(0.055795, 0.018129)
(0.055198, 0.019873)
(0.054547, 0.021597)
(0.053842, 0.023299)
(0.053083, 0.024979)
(0.052272, 0.026634)
(0.051410, 0.028263)
(0.050497, 0.029864)
(0.049534, 0.031435)
(0.048522, 0.032976)
(0.047462, 0.034483)
(0.046356, 0.035957)
(0.045203, 0.037396)
(0.044007, 0.038797)
(0.042766, 0.040160)
(0.041484, 0.041484)
(0.040160, 0.042766)
(0.038797, 0.044007)
(0.037396, 0.045203)
(0.035957, 0.046356)
(0.034483, 0.047462)
(0.032976, 0.048522)
(0.031435, 0.049534)
(0.029864, 0.050497)
(0.028263, 0.051410)
(0.026634, 0.052272)
(0.024979, 0.053083)
(0.023299, 0.053842)
(0.021597, 0.054547)
(0.019873, 0.055198)
(0.018129, 0.055795)
(0.016367, 0.056337)
(0.014590, 0.056824)
(0.012798, 0.057254)
(0.010993, 0.057628)
(0.009177, 0.057944)
(0.007353, 0.058204)
(0.005521, 0.058406)
(0.003684, 0.058551)
(0.001843, 0.058638)
(-0.000000, 0.058667)
(-0.001843, 0.058638)
(-0.003684, 0.058551)
(-0.005521, 0.058406)
(-0.007353, 0.058204)
(-0.009177, 0.057944)
(-0.010993, 0.057628)
(-0.012798, 0.057254)
(-0.014590, 0.056824)
(-0.016367, 0.056337)
(-0.018129, 0.055795)
(-0.019873, 0.055198)
(-0.021597, 0.054547)
(-0.023299, 0.053842)
(-0.024979, 0.053083)
(-0.026634, 0.052272)
(-0.028263, 0.051410)
(-0.029864, 0.050497)
(-0.031435, 0.049534)
(-0.032976, 0.048522)
(-0.034483, 0.047462)
(-0.035957, 0.046356)
(-0.037396, 0.045203)
(-0.038797, 0.044007)
(-0.040160, 0.042766)
(-0.041484, 0.041484)
(-0.042766, 0.040160)
(-0.044007, 0.038797)
(-0.045203, 0.037396)
(-0.046356, 0.035957)
(-0.047462, 0.034483)
(-0.048522, 0.032976)
(-0.049534, 0.031435)
(-0.050497, 0.029864)
(-0.051410, 0.028263)
(-0.052272, 0.026634)
(-0.053083, 0.024979)
(-0.053842, 0.023299)
(-0.054547, 0.021597)
(-0.055198, 0.019873)
(-0.055795, 0.018129)
(-0.056337, 0.016367)
(-0.056824, 0.014590)
(-0.057254, 0.012798)
(-0.057628, 0.010993)
(-0.057944, 0.009177)
(-0.058204, 0.007353)
(-0.058406, 0.005521)
(-0.058551, 0.003684)
(-0.058638, 0.001843)
(-0.058667, 0.000000)
(-0.058638, -0.001843)
(-0.058551, -0.003684)
(-0.058406, -0.005521)
(-0.058204, -0.007353)
(-0.057944, -0.009177)
(-0.057628, -0.010993)
(-0.057254, -0.012798)
(-0.056824, -0.014590)
(-0.056337, -0.016367)
(-0.055795, -0.018129)
(-0.055198, -0.019873)
(-0.054547, -0.021597)
(-0.053842, -0.023299)
(-0.053083, -0.024979)
(-0.052272, -0.026634)
(-0.051410, -0.028263)
(-0.050497, -0.029864)
(-0.049534, -0.031435)
(-0.048522, -0.032976)
(-0.047462, -0.034483)
(-0.046356, -0.035957)
(-0.045203, -0.037396)
(-0.044007, -0.038797)
(-0.042766, -0.040160)
(-0.041484, -0.041484)
(-0.040160, -0.042766)
(-0.038797, -0.044007)
(-0.037396, -0.045203)
(-0.035957, -0.046356)
(-0.034483, -0.047462)
(-0.032976, -0.048522)
(-0.031435, -0.049534)
(-0.029864, -0.050497)
(-0.028263, -0.051410)
(-0.026634, -0.052272)
(-0.024979, -0.053083)
(-0.023299, -0.053842)
(-0.021597, -0.054547)
(-0.019873, -0.055198)
(-0.018129, -0.055795)
(-0.016367, -0.056337)
(-0.014590, -0.056824)
(-0.012798, -0.057254)
(-0.010993, -0.057628)
(-0.009177, -0.057944)
(-0.007353, -0.058204)
(-0.005521, -0.058406)
(-0.003684, -0.058551)
(-0.001843, -0.058638)
(-0.000000, -0.058667)
(0.001843, -0.058638)
(0.003684, -0.058551)
(0.005521, -0.058406)
(0.007353, -0.058204)
(0.009177, -0.057944)
(0.010993, -0.057628)
(0.012798, -0.057254)
(0.014590, -0.056824)
(0.016367, -0.056337)
(0.018129, -0.055795)
(0.019873, -0.055198)
(0.021597, -0.054547)
(0.023299, -0.053842)
(0.024979, -0.053083)
(0.026634, -0.052272)
(0.028263, -0.051410)
(0.029864, -0.050497)
(0.031435, -0.049534)
(0.032976, -0.048522)
(0.034483, -0.047462)
(0.035957, -0.046356)
(0.037396, -0.045203)
(0.038797, -0.044007)
(0.040160, -0.042766)
(0.041484, -0.041484)
(0.042766, -0.040160)
(0.044007, -0.038797)
(0.045203, -0.037396)
(0.046356, -0.035957)
(0.047462, -0.034483)
(0.048522, -0.032976)
(0.049534, -0.031435)
(0.050497, -0.029864)
(0.051410, -0.028263)
(0.052272, -0.026634)
(0.053083, -0.024979)
(0.053842, -0.023299)
(0.054547, -0.021597)
(0.055198, -0.019873)
(0.055795, -0.018129)
(0.056337, -0.016367)
(0.056824, -0.014590)
(0.057254, -0.012798)
(0.057628, -0.010993)
(0.057944, -0.009177)
(0.058204, -0.007353)
(0.058406, -0.005521)
(0.058551, -0.003684)
(0.058638, -0.001843)
(0.058667, -0.000000)
};
\addplot[
smooth,
line width=.5pt,
color={rgb,255:red,229;green,127;blue,25},
dash pattern={on 2pt off 3pt on 1pt off 3pt},
mark=diamond*,
mark options={solid,scale=0.5}]
plot coordinates {
(0.010517, -0.080063)
(-0.010517, 0.080063)
};
\addplot[
smooth,
line width=.5pt,
color={rgb,255:red,229;green,127;blue,25},
dash pattern={on 2pt off 3pt on 1pt off 3pt},
mark=diamond*,
mark options={solid,scale=0.5}]
plot coordinates {
(-0.070412, -0.009249)
(0.070412, 0.009249)
};
\end{axis}
\end{tikzpicture}%

\end{document}

Nicht nervös werden - die vielen Koordinaten sind für den Kreis und die Ellipse...

btw: Wenn noch "jemand" eine Idee hat wie ich den automatisch verursachten 10^-2 - Kram wegbekomme, wäre das auch schon schön ;)

Beste Grüße

Thomas

bobmalaria
12-02-2012, 18:37
hi,

zum thema minimalbeispiel verdient dein code allemal die note ungenügend :rolleyes:.

naja. du kannst die lenged position selbst angeben. steht auch im manual mit beispiel wie man das macht.

mit einem blick ins manual kannst du auch herausfinden wie man "number format" so einstellt, dass es es nicht zu dieser x10^y darstellung kommt.

mit \addlegendentry kansnt du zu jedem datensatz eine entsprechende legende kreieren.


das sieht dann so aus:

http://www.mrunix.de/forums/attachment.php?attachmentid=5033&stc=1&d=1329071663


\documentclass{article}
\usepackage{geometry}
\geometry{a4paper,left=35mm,right=28mm, top=25mm, bottom=27mm}

\usepackage[latin1]{inputenc}
\usepackage{amsmath}
%------------- [Beginn] --------------------------------
\usepackage{tikz}
\usetikzlibrary{shapes,arrows,positioning,calc,fit ,intersections}
\usetikzlibrary{arrows}
\usepgflibrary{arrows}

\usepackage{pgfplots} % für schöne MatLab-Grafiken
\newcommand{\pgfwidth}{.8\linewidth}
\newcommand{\pgfheight}{.6\linewidth}
%------------- [Ende] ----------------------------------
\begin{document}
\pagestyle{empty}

\pgfplotsset{compat=1.3}
\pgfplotsset{every axis legend/.append style={
at={(0.5,-0.2)},
anchor=center}}


\begin{tikzpicture}[scale=0.84]%
\begin{axis}[
legend columns=3,
legend cell align=left,
tick pos=left,
tick align=inside,
title={Konfidenzellipse 90\%, Student-t-Verteilung},
xlabel={x-Wert [m]},
ylabel={y-Wert [m]},
xmin=-0.1,
xmax=0.1,
ymin=-0.1,
ymax=0.1,
xtick={-0.1,-0.05,0,0.05,0.1},
ytick={-0.1,-0.05,0,0.05,0.1},
width=\pgfwidth,
%height=\pgfheight,
axis equal,
]
%
\addplot[
smooth,
line width=.5pt,
color=red,
solid]
plot coordinates {
(-0.070412, -0.009249)
(-0.070046, -0.011759)
(-0.069612, -0.014258)
(-0.069109, -0.016743)
(-0.068538, -0.019211)
(-0.067899, -0.021660)
(-0.067194, -0.024087)
(-0.066422, -0.026491)
(-0.065584, -0.028869)
(-0.064682, -0.031219)
(-0.063715, -0.033537)
(-0.062686, -0.035823)
(-0.061595, -0.038073)
(-0.060444, -0.040285)
(-0.059232, -0.042458)
(-0.057963, -0.044589)
(-0.056636, -0.046676)
(-0.055253, -0.048716)
(-0.053815, -0.050709)
(-0.052325, -0.052652)
(-0.050783, -0.054542)
(-0.049190, -0.056379)
(-0.047549, -0.058160)
(-0.045862, -0.059884)
(-0.044129, -0.061549)
(-0.042352, -0.063153)
(-0.040534, -0.064695)
(-0.038675, -0.066173)
(-0.036779, -0.067585)
(-0.034846, -0.068931)
(-0.032879, -0.070209)
(-0.030879, -0.071417)
(-0.028849, -0.072555)
(-0.026790, -0.073622)
(-0.024705, -0.074615)
(-0.022596, -0.075535)
(-0.020464, -0.076381)
(-0.018312, -0.077151)
(-0.016142, -0.077845)
(-0.013956, -0.078463)
(-0.011756, -0.079002)
(-0.009545, -0.079464)
(-0.007324, -0.079848)
(-0.005096, -0.080152)
(-0.002863, -0.080378)
(-0.000627, -0.080524)
(0.001609, -0.080591)
(0.003844, -0.080578)
(0.006075, -0.080486)
(0.008300, -0.080314)
(0.010517, -0.080063)
(0.012723, -0.079733)
(0.014917, -0.079324)
(0.017096, -0.078837)
(0.019259, -0.078272)
(0.021402, -0.077630)
(0.023524, -0.076912)
(0.025623, -0.076117)
(0.027697, -0.075247)
(0.029743, -0.074303)
(0.031760, -0.073286)
(0.033746, -0.072197)
(0.035698, -0.071036)
(0.037616, -0.069805)
(0.039496, -0.068505)
(0.041337, -0.067138)
(0.043137, -0.065704)
(0.044895, -0.064205)
(0.046608, -0.062643)
(0.048275, -0.061020)
(0.049895, -0.059336)
(0.051466, -0.057593)
(0.052985, -0.055794)
(0.054453, -0.053940)
(0.055866, -0.052032)
(0.057225, -0.050073)
(0.058527, -0.048065)
(0.059771, -0.046009)
(0.060957, -0.043907)
(0.062082, -0.041763)
(0.063146, -0.039577)
(0.064147, -0.037352)
(0.065086, -0.035091)
(0.065960, -0.032794)
(0.066769, -0.030466)
(0.067512, -0.028107)
(0.068188, -0.025720)
(0.068797, -0.023308)
(0.069338, -0.020874)
(0.069811, -0.018418)
(0.070215, -0.015944)
(0.070550, -0.013455)
(0.070815, -0.010952)
(0.071010, -0.008439)
(0.071135, -0.005917)
(0.071190, -0.003389)
(0.071174, -0.000858)
(0.071089, 0.001673)
(0.070933, 0.004204)
(0.070707, 0.006730)
(0.070412, 0.009249)
(0.070046, 0.011759)
(0.069612, 0.014258)
(0.069109, 0.016743)
(0.068538, 0.019211)
(0.067899, 0.021660)
(0.067194, 0.024087)
(0.066422, 0.026491)
(0.065584, 0.028869)
(0.064682, 0.031219)
(0.063715, 0.033537)
(0.062686, 0.035823)
(0.061595, 0.038073)
(0.060444, 0.040285)
(0.059232, 0.042458)
(0.057963, 0.044589)
(0.056636, 0.046676)
(0.055253, 0.048716)
(0.053815, 0.050709)
(0.052325, 0.052652)
(0.050783, 0.054542)
(0.049190, 0.056379)
(0.047549, 0.058160)
(0.045862, 0.059884)
(0.044129, 0.061549)
(0.042352, 0.063153)
(0.040534, 0.064695)
(0.038675, 0.066173)
(0.036779, 0.067585)
(0.034846, 0.068931)
(0.032879, 0.070209)
(0.030879, 0.071417)
(0.028849, 0.072555)
(0.026790, 0.073622)
(0.024705, 0.074615)
(0.022596, 0.075535)
(0.020464, 0.076381)
(0.018312, 0.077151)
(0.016142, 0.077845)
(0.013956, 0.078463)
(0.011756, 0.079002)
(0.009545, 0.079464)
(0.007324, 0.079848)
(0.005096, 0.080152)
(0.002863, 0.080378)
(0.000627, 0.080524)
(-0.001609, 0.080591)
(-0.003844, 0.080578)
(-0.006075, 0.080486)
(-0.008300, 0.080314)
(-0.010517, 0.080063)
(-0.012723, 0.079733)
(-0.014917, 0.079324)
(-0.017096, 0.078837)
(-0.019259, 0.078272)
(-0.021402, 0.077630)
(-0.023524, 0.076912)
(-0.025623, 0.076117)
(-0.027697, 0.075247)
(-0.029743, 0.074303)
(-0.031760, 0.073286)
(-0.033746, 0.072197)
(-0.035698, 0.071036)
(-0.037616, 0.069805)
(-0.039496, 0.068505)
(-0.041337, 0.067138)
(-0.043137, 0.065704)
(-0.044895, 0.064205)
(-0.046608, 0.062643)
(-0.048275, 0.061020)
(-0.049895, 0.059336)
(-0.051466, 0.057593)
(-0.052985, 0.055794)
(-0.054453, 0.053940)
(-0.055866, 0.052032)
(-0.057225, 0.050073)
(-0.058527, 0.048065)
(-0.059771, 0.046009)
(-0.060957, 0.043907)
(-0.062082, 0.041763)
(-0.063146, 0.039577)
(-0.064147, 0.037352)
(-0.065086, 0.035091)
(-0.065960, 0.032794)
(-0.066769, 0.030466)
(-0.067512, 0.028107)
(-0.068188, 0.025720)
(-0.068797, 0.023308)
(-0.069338, 0.020874)
(-0.069811, 0.018418)
(-0.070215, 0.015944)
(-0.070550, 0.013455)
(-0.070815, 0.010952)
(-0.071010, 0.008439)
(-0.071135, 0.005917)
(-0.071190, 0.003389)
(-0.071174, 0.000858)
(-0.071089, -0.001673)
(-0.070933, -0.004204)
(-0.070707, -0.006730)
(-0.070412, -0.009249)
};
\addlegendentry{Daten 1}
\addplot[
smooth,
line width=.5pt,
color=black,
only marks,
mark=o,
mark options={solid}]
plot coordinates {
(0.000000, 0.000000)
};
\addlegendentry{Datenpunkt 1}
\addplot[
smooth,
line width=.5pt,
color={rgb,255:red,153;green,204;blue,127},
only marks,
mark=o,
mark options={solid}]
plot coordinates {
(0.048838, 0.022956)
};
\addlegendentry{Datenpunkt 2}
\addplot[
smooth,
line width=.5pt,
color=blue,
dashed]
plot coordinates {
(0.058667, 0.000000)
(0.058638, 0.001843)
(0.058551, 0.003684)
(0.058406, 0.005521)
(0.058204, 0.007353)
(0.057944, 0.009177)
(0.057628, 0.010993)
(0.057254, 0.012798)
(0.056824, 0.014590)
(0.056337, 0.016367)
(0.055795, 0.018129)
(0.055198, 0.019873)
(0.054547, 0.021597)
(0.053842, 0.023299)
(0.053083, 0.024979)
(0.052272, 0.026634)
(0.051410, 0.028263)
(0.050497, 0.029864)
(0.049534, 0.031435)
(0.048522, 0.032976)
(0.047462, 0.034483)
(0.046356, 0.035957)
(0.045203, 0.037396)
(0.044007, 0.038797)
(0.042766, 0.040160)
(0.041484, 0.041484)
(0.040160, 0.042766)
(0.038797, 0.044007)
(0.037396, 0.045203)
(0.035957, 0.046356)
(0.034483, 0.047462)
(0.032976, 0.048522)
(0.031435, 0.049534)
(0.029864, 0.050497)
(0.028263, 0.051410)
(0.026634, 0.052272)
(0.024979, 0.053083)
(0.023299, 0.053842)
(0.021597, 0.054547)
(0.019873, 0.055198)
(0.018129, 0.055795)
(0.016367, 0.056337)
(0.014590, 0.056824)
(0.012798, 0.057254)
(0.010993, 0.057628)
(0.009177, 0.057944)
(0.007353, 0.058204)
(0.005521, 0.058406)
(0.003684, 0.058551)
(0.001843, 0.058638)
(-0.000000, 0.058667)
(-0.001843, 0.058638)
(-0.003684, 0.058551)
(-0.005521, 0.058406)
(-0.007353, 0.058204)
(-0.009177, 0.057944)
(-0.010993, 0.057628)
(-0.012798, 0.057254)
(-0.014590, 0.056824)
(-0.016367, 0.056337)
(-0.018129, 0.055795)
(-0.019873, 0.055198)
(-0.021597, 0.054547)
(-0.023299, 0.053842)
(-0.024979, 0.053083)
(-0.026634, 0.052272)
(-0.028263, 0.051410)
(-0.029864, 0.050497)
(-0.031435, 0.049534)
(-0.032976, 0.048522)
(-0.034483, 0.047462)
(-0.035957, 0.046356)
(-0.037396, 0.045203)
(-0.038797, 0.044007)
(-0.040160, 0.042766)
(-0.041484, 0.041484)
(-0.042766, 0.040160)
(-0.044007, 0.038797)
(-0.045203, 0.037396)
(-0.046356, 0.035957)
(-0.047462, 0.034483)
(-0.048522, 0.032976)
(-0.049534, 0.031435)
(-0.050497, 0.029864)
(-0.051410, 0.028263)
(-0.052272, 0.026634)
(-0.053083, 0.024979)
(-0.053842, 0.023299)
(-0.054547, 0.021597)
(-0.055198, 0.019873)
(-0.055795, 0.018129)
(-0.056337, 0.016367)
(-0.056824, 0.014590)
(-0.057254, 0.012798)
(-0.057628, 0.010993)
(-0.057944, 0.009177)
(-0.058204, 0.007353)
(-0.058406, 0.005521)
(-0.058551, 0.003684)
(-0.058638, 0.001843)
(-0.058667, 0.000000)
(-0.058638, -0.001843)
(-0.058551, -0.003684)
(-0.058406, -0.005521)
(-0.058204, -0.007353)
(-0.057944, -0.009177)
(-0.057628, -0.010993)
(-0.057254, -0.012798)
(-0.056824, -0.014590)
(-0.056337, -0.016367)
(-0.055795, -0.018129)
(-0.055198, -0.019873)
(-0.054547, -0.021597)
(-0.053842, -0.023299)
(-0.053083, -0.024979)
(-0.052272, -0.026634)
(-0.051410, -0.028263)
(-0.050497, -0.029864)
(-0.049534, -0.031435)
(-0.048522, -0.032976)
(-0.047462, -0.034483)
(-0.046356, -0.035957)
(-0.045203, -0.037396)
(-0.044007, -0.038797)
(-0.042766, -0.040160)
(-0.041484, -0.041484)
(-0.040160, -0.042766)
(-0.038797, -0.044007)
(-0.037396, -0.045203)
(-0.035957, -0.046356)
(-0.034483, -0.047462)
(-0.032976, -0.048522)
(-0.031435, -0.049534)
(-0.029864, -0.050497)
(-0.028263, -0.051410)
(-0.026634, -0.052272)
(-0.024979, -0.053083)
(-0.023299, -0.053842)
(-0.021597, -0.054547)
(-0.019873, -0.055198)
(-0.018129, -0.055795)
(-0.016367, -0.056337)
(-0.014590, -0.056824)
(-0.012798, -0.057254)
(-0.010993, -0.057628)
(-0.009177, -0.057944)
(-0.007353, -0.058204)
(-0.005521, -0.058406)
(-0.003684, -0.058551)
(-0.001843, -0.058638)
(-0.000000, -0.058667)
(0.001843, -0.058638)
(0.003684, -0.058551)
(0.005521, -0.058406)
(0.007353, -0.058204)
(0.009177, -0.057944)
(0.010993, -0.057628)
(0.012798, -0.057254)
(0.014590, -0.056824)
(0.016367, -0.056337)
(0.018129, -0.055795)
(0.019873, -0.055198)
(0.021597, -0.054547)
(0.023299, -0.053842)
(0.024979, -0.053083)
(0.026634, -0.052272)
(0.028263, -0.051410)
(0.029864, -0.050497)
(0.031435, -0.049534)
(0.032976, -0.048522)
(0.034483, -0.047462)
(0.035957, -0.046356)
(0.037396, -0.045203)
(0.038797, -0.044007)
(0.040160, -0.042766)
(0.041484, -0.041484)
(0.042766, -0.040160)
(0.044007, -0.038797)
(0.045203, -0.037396)
(0.046356, -0.035957)
(0.047462, -0.034483)
(0.048522, -0.032976)
(0.049534, -0.031435)
(0.050497, -0.029864)
(0.051410, -0.028263)
(0.052272, -0.026634)
(0.053083, -0.024979)
(0.053842, -0.023299)
(0.054547, -0.021597)
(0.055198, -0.019873)
(0.055795, -0.018129)
(0.056337, -0.016367)
(0.056824, -0.014590)
(0.057254, -0.012798)
(0.057628, -0.010993)
(0.057944, -0.009177)
(0.058204, -0.007353)
(0.058406, -0.005521)
(0.058551, -0.003684)
(0.058638, -0.001843)
(0.058667, -0.000000)
};
\addlegendentry{Datenschrott 1}
\addplot[
smooth,
line width=.5pt,
color={rgb,255:red,229;green,127;blue,25},
dash pattern={on 2pt off 3pt on 1pt off 3pt},
mark=diamond*,
mark options={solid,scale=0.5}]
plot coordinates {
(0.010517, -0.080063)
(-0.010517, 0.080063)
};
\addlegendentry{Datenpunkt 3}
\addplot[
smooth,
line width=.5pt,
color={rgb,255:red,229;green,127;blue,25},
dash pattern={on 2pt off 3pt on 1pt off 3pt},
mark=diamond*,
mark options={solid,scale=0.5}]
plot coordinates {
(-0.070412, -0.009249)
(0.070412, 0.009249)
};
\addlegendentry{Datenpunkt 4}
\end{axis}
\end{tikzpicture}%

\end{document}

Barny.G
13-02-2012, 13:33
Moin moin,

hat sehr gut geklappt! Danke.


mit einem blick ins manual kannst du auch herausfinden wie man "number format" so einstellt, dass es es nicht zu dieser x10^y darstellung kommt.
Ja, stimmt :) ich wusste eben nur nicht wonach ich suchen soll(te). Auf "number format" bin ich nicht gekommen. Aber jetzt ist es so wie ich es haben möchte.


mit \addlegendentry kansnt du zu jedem datensatz eine entsprechende legende kreieren.
Vielen Dank für Deinen Hinweis, ich habe das mal im manual (tikz&pgf / Copyright 2007 by Till Tantau) gesucht und leider keinen Eintrag gefunden. Habe ich ggf, das Falsche?

Jedenfalls herzlichen Dank, nun ist es schick!

Thomas

bobmalaria
13-02-2012, 14:16
hi,

ja hast du. pgfplots ist einpaket das auf tikz aufbaut. es kommt mit ganz eigenen befehlen.
du kannst also im pgfplots.pdf dokument nachschauen.

am schnellsten geht das per

texdoc pgfplots

in der eingabeaufforderung/konsole.

gruss

Barny.G
13-02-2012, 16:17
Moijn,

vielen Dank, nun habe ich auch "\addlegendentry" gefunden. Naja, wennman an der falschen Stelle sucht...

Schöne Grüße

Thomas