Seite 1 von 1

Graphik lässt sich nicht richtig positionieren

Verfasst: Di 24. Nov 2015, 14:47
von Waschmaschiene
Das Problem ist das die vierte Graphik immer auf die nächste Seite springt, obwohl doch noch ausreichend genug Platz vorhanden. Was um himmelswillen ist das Problem... :evil:

Das Minimalbeispiel:
\documentclass[a4paper,11pt]{article}

\usepackage{geometry}
\geometry{a4paper,left=20mm,right=20mm, top=2cm, bottom=2.1cm}


\usepackage{graphicx}
\usepackage{tikz} 
\usetikzlibrary{graphs}  

\begin{document}


\newpage

\section{Anhang}

\subsection{Graphiken} \label{Beispiele}

\begin{figure}[h]
\begin{tikzpicture}
\coordinate[label=left:$A$] (A) at (1,2);
\coordinate[label=right:$B$] (B) at (3,2);
\coordinate[label=left:$C$] (C) at (-2,1);
%\coordinate[label=right:$D$] (D) at (0,0);
\draw (A) -- (B);
\draw (A) -- (C); 
%\draw (A) -- (D);
\draw (B) -- (C);
%\draw (B) -- (D);
%\draw (C) -- (D);
\fill (A) circle (2pt);
\fill (B) circle (2pt);
\fill (C) circle (2pt);
%\fill[red] (D) circle (2pt);
\end{tikzpicture}
 \caption{Beispiel für eine  n-Clique ohne D}
\end{figure}

\begin{figure}[h]
\begin{tikzpicture}
\coordinate[label=left:$A$] (A) at (1,2);
\coordinate[label=right:$B$] (B) at (3,2);
\coordinate[label=left:$C$] (C) at (-2,1);
\coordinate[label=right:$D$] (D) at (0,0);
\draw (A) -- (B);
\draw (A) -- (C); 
\draw (A) -- (D);
\draw (B) -- (C);
\draw (B) -- (D);
\draw (C) -- (D);
\fill (A) circle (2pt);
\fill (B) circle (2pt);
\fill (C) circle (2pt);
\fill[red] (D) circle (2pt);
\end{tikzpicture}
 \caption{Beispiel für eine  n-Clique mit D}
\end{figure}

\begin{figure}[h]
\begin{tikzpicture}
\coordinate[label=left:$A$] (A) at (1,2);
\coordinate[label=right:$B$] (B) at (3,2);
\coordinate[label=left:$C$] (C) at (-2,1);
%\coordinate[label=right:$D$] (D) at (0,0);
\draw (A) -- (B);
\draw (B) -- (C);
%\draw (C) -- (D);
\fill (A) circle (2pt);
\fill (B) circle (2pt);
\fill (C) circle (2pt);
%\fill[red] (D) circle (2pt);
\end{tikzpicture}
\caption{Beispiel für eine  k-Plex ohne D}
\end{figure}

\begin{figure}[h]
\begin{tikzpicture}
\coordinate[label=left:$A$] (A) at (1,2);
\coordinate[label=right:$B$] (B) at (3,2);
\coordinate[label=left:$C$] (C) at (-2,1);
\coordinate[label=right:$D$] (D) at (0,0);
\draw (A) -- (B);
\draw (A) -- (D);
\draw (B) -- (C);
\draw (C) -- (D);
\fill (A) circle (2pt);
\fill (B) circle (2pt);
\fill (C) circle (2pt);
\fill[red] (D) circle (2pt);
\end{tikzpicture}
\caption{Beispiel für eine  k-Plex mit D}
\end{figure}

\end{document}


Verfasst: Di 24. Nov 2015, 15:19
von Noch so einer
Wenn Du nicht willst, dass die Bilder gleiten, dann nimm keine Gleitumgebung. Dass das Gleiten über mehr Parameter als nur das optionale Argument von figure gesteuert wird, ist in den in den wichtigen Hinweisen verlinkten Quellen deutlich erklärt.

Verfasst: Di 24. Nov 2015, 16:06
von Waschmaschiene
aber mit [h] ist doch die Position einerseits angeben.

Zudem macht ein gleiten nicht Sinn wenn 2/3 der Seite noch leer sind.

Verfasst: Di 24. Nov 2015, 16:26
von u_fischer
[h] heißt nicht hier, sondern "hier wenn es die Regeln nicht verletzt". Und da du viele Floats hintereinander hast, verletzt du die Regel "Floats sollten nicht zuviel Platz auf der Seite einnehmen".

http://www.tex.ac.uk/FAQ-floats.html

Verfasst: Di 24. Nov 2015, 16:46
von Waschmaschiene
Die Lösung findet sich hier

http://texwelt.de/wissen/fragen/737/wie ... hinzufugen


Wichtig ist zu beachten das man den Caption-Package mit optionen einbindet.

Ebenfalls müssen die bezeichnung für die graphik und die bezeichung für dne label befehl übereinstimmen.

Sonst gibt es Fehler.