Graphik lässt sich nicht richtig positionieren

Tabellen und Grafiken erstellen und anordnen


Waschmaschiene
Forum-Fortgeschrittener
Forum-Fortgeschrittener
Beiträge: 80
Registriert: Mi 7. Jan 2015, 07:22

Graphik lässt sich nicht richtig positionieren

Beitrag 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}

Zuletzt geändert von Waschmaschiene am Di 24. Nov 2015, 16:09, insgesamt 1-mal geändert.

Noch so einer

Beitrag 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.

Waschmaschiene
Forum-Fortgeschrittener
Forum-Fortgeschrittener
Beiträge: 80
Registriert: Mi 7. Jan 2015, 07:22

Beitrag 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.
Zuletzt geändert von Waschmaschiene am Di 24. Nov 2015, 16:30, insgesamt 1-mal geändert.

Benutzeravatar
u_fischer
Forum-Meister
Forum-Meister
Beiträge: 4269
Registriert: Do 22. Nov 2012, 11:09
Kontaktdaten:

Beitrag 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

Waschmaschiene
Forum-Fortgeschrittener
Forum-Fortgeschrittener
Beiträge: 80
Registriert: Mi 7. Jan 2015, 07:22

Beitrag 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.

Antworten