von tramadalGast » Mi 12. Mär 2014, 12:52
Hallo liebe Latex Helfer,
ich will einen 2D Plot aus einer Tabelle mit 3 Koordinaten (x,y Koordinaten und z=Farbe) machen. Hierbei soll ein surface durch interpolation zwischen den z-Werten entsteht.
Tabelle: nodes.dat
X Y Z
-44.0651 2343.99 -98.3899
55.9848 2368.11 137.286
-75.7082 2102.19 -64.2877
88.9038 2102.33 134.792
-111.614 1626.88 -0.0321223
119.607 1626.87 107.971
usw...
Mein Versuch:
\documentclass[12pt,a4paper]{book}%article: für mittelgroße und
\usepackage[ table ]{ xcolor }
\usepackage{tikz}
\usepackage{pgfplotstable}
\pgfplotsset{compat=1.3}
\usepgfplotslibrary{patchplots} % LATEX and plain TEX
\usepgfplotslibrary[patchplots] % ConTEXt
\usetikzlibrary{pgfplots.patchplots} % LATEX and plain TEX
\usetikzlibrary[pgfplots.patchplots] % ConTEXt
\begin{document}
\begin{tikzpicture}
\begin{axis}[
nodes near coords={(\coordindex)},
title=My Diagramm
]
\addplot3[
patch,
patch type=biquadratic,
shader=interp,
point meta=explicit
]
table[x=X, y=Y, z=Z]{nodes.dat};
% coordinates {
%(0,0) [1] (6,1) [2] (5,5) [3] (-1,5) [4]
%(3,1) [1] (6,3) [2] (2,6) [3] (0,3) [4]
%(3,3.75) [4]
%};%hiermit geht es fuer addplot...
\end{axis}
\end{tikzpicture}
\end{document}
Leider geht das nicht und ich finde leider kein anderes Beispiel an dem ich mich orientieren kann...
Hallo liebe Latex Helfer,
ich will einen 2D Plot aus einer Tabelle mit 3 Koordinaten (x,y Koordinaten und z=Farbe) machen. Hierbei soll ein surface durch interpolation zwischen den z-Werten entsteht.
Tabelle: nodes.dat
X Y Z
-44.0651 2343.99 -98.3899
55.9848 2368.11 137.286
-75.7082 2102.19 -64.2877
88.9038 2102.33 134.792
-111.614 1626.88 -0.0321223
119.607 1626.87 107.971
usw...
Mein Versuch:
[code]
\documentclass[12pt,a4paper]{book}%article: für mittelgroße und
\usepackage[ table ]{ xcolor }
\usepackage{tikz}
\usepackage{pgfplotstable}
\pgfplotsset{compat=1.3}
\usepgfplotslibrary{patchplots} % LATEX and plain TEX
\usepgfplotslibrary[patchplots] % ConTEXt
\usetikzlibrary{pgfplots.patchplots} % LATEX and plain TEX
\usetikzlibrary[pgfplots.patchplots] % ConTEXt
\begin{document}
\begin{tikzpicture}
\begin{axis}[
nodes near coords={(\coordindex)},
title=My Diagramm
]
\addplot3[
patch,
patch type=biquadratic,
shader=interp,
point meta=explicit
]
table[x=X, y=Y, z=Z]{nodes.dat};
% coordinates {
%(0,0) [1] (6,1) [2] (5,5) [3] (-1,5) [4]
%(3,1) [1] (6,3) [2] (2,6) [3] (0,3) [4]
%(3,3.75) [4]
%};%hiermit geht es fuer addplot...
\end{axis}
\end{tikzpicture}
\end{document}
[/code]
Leider geht das nicht und ich finde leider kein anderes Beispiel an dem ich mich orientieren kann...