Positionsnummern mit Tikz

Tabellen und Grafiken erstellen und anordnen


Waischno
Forum-Anfänger
Forum-Anfänger
Beiträge: 31
Registriert: Do 22. Mai 2014, 19:39

Positionsnummern mit Tikz

Beitrag von Waischno »

Hi,

ich möchte gerne Positionsnummern in ein Bild zeichnen. Dazu verwende ich Tikz. Bis jetzt sieht das ganze so aus:
\documentclass[12pt,a4paper,twoside,listof=totoc,bibliography=totoc,index=totoc,DIV=15,BCOR=15mm]{scrreprt}
\usepackage{relsize}
\usepackage{scrhack}
\usepackage{setspace}
\usepackage{scrpage2}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[ngerman]{babel,translator}
\usepackage{makeidx}
\usepackage{a4}
\usepackage{graphicx}
\usepackage{tikz,pgfplots,pgfplotstable}
\usepackage{bigdelim}
\usepackage{epstopdf}

\usetikzlibrary{arrows,shapes,backgrounds}
\begin{document}
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.\vspace*{2ex}

% For every picture that defines or uses external nodes, you'll have to
% apply the 'remember picture' style. To avoid some typing, we'll apply
% the style to all pictures.
\tikzstyle{every picture}+=[remember picture]
\tikzstyle{na} = [baseline=-.5ex]

        \tikzstyle{background grid}=[draw, black!50,step=1cm]
				\resizebox{\textwidth-1cm}{!}{
        \begin{tikzpicture}
            % Put the graphic inside a node. This makes it easy to place the
            % graphic and to draw on top of it. 
            % The above right option is used to place the lower left corner
            % of the image at the (0,0) coordinate. 
            \node [inner sep=0pt,above right,opacity=0.5] (Bild)
                {\includegraphics[width=\textwidth]{Vakuumpumpstand}};
            % show origin
            %\fill (0,0) circle (2pt);
            % define destination coordinates
            \node [draw, circle](Pos1) at (\textwidth + 0.5cm,14.5cm) {1};
						\node [draw, circle](Pos2) at (\textwidth + 0.5cm,12.5cm) {2};
						\node [draw, circle](Pos3) at (\textwidth + 0.5cm,10.5cm) {3};
						\node [draw, circle](Pos4) at (\textwidth + 0.5cm,8.5cm) {4};
						\node [draw, circle](Pos5) at (\textwidth + 0.5cm,6.5cm) {5};
						\path (1.5,14) coordinate (Filter)
                  (3,13.4) coordinate (Drucksensor)
                  (3.7,13) coordinate (Ventil)
									(4.5,6.5) coordinate (Agilent)
									(11,5.5) coordinate (Pumpe);
						\path [draw, -stealth, thick](Pos1)--(Filter);
						\path [draw, -stealth, thick](Pos2)--(Drucksensor);
						\path [draw, -stealth, thick](Pos3)--(Ventil);
						\path [draw, -stealth, thick](Pos4)--(Agilent);
						\path [draw, -stealth, thick](Pos5)--(Pumpe);
        \end{tikzpicture}
				}

\end{document}
Nun möchte ich jedoch eine relative Positionierung einführen, damit später beim scallieren des Bildes noch alles passt. Leider funktioniert das nicht. Wenn ich die Positionsnummern z.B. rechts vom Bild (right of=Bild) einsetzte, dann werden diese im Bild angezeigt.
Gibt es eine möglichkeit auf die Höhe des Bildes zuzugreifen?
Dann könnte ich sowas schreiben wie:
\node [draw, circle](Pos1) at (\textwidth + 0.5cm,[b]\höhe des Bildes[/b]) {1}
Gibt es evtl. eine einfachere Möglichkeit Positionsummern anzugeben?
Viele Grüße