Namen für Diagramm vergeben und Anordnung einer Tabelle

Antwort erstellen


Diese Frage dient dazu, das automatisierte Versenden von Formularen durch Spam-Bots zu verhindern.
Smilies
:D :) :( :o :shock: :? 8) :lol: :-x :P :oops: :cry: :evil: :twisted: :roll: :wink: :!: :?: :idea: :arrow: :| :mrgreen:

BBCode ist eingeschaltet
[img] ist eingeschaltet
[flash] ist ausgeschaltet
[url] ist eingeschaltet
Smilies sind eingeschaltet

Die letzten Beiträge des Themas

Ich habe die Datenschutzerklärung gelesen und bin damit einverstanden.

   

Wenn du eine Datei oder mehrere Dateien anhängen möchtest, gib die Details unten ein.

Ansicht erweitern Die letzten Beiträge des Themas: Namen für Diagramm vergeben und Anordnung einer Tabelle

von Basti88 » Do 17. Nov 2016, 18:45

Vielen Dank,
ich habe es nochmal ein wenig angepasst, aber die Lösung mit dem Minipage hat geholfen.
Gruß
Basti

von Bartman » Do 17. Nov 2016, 17:17

Wie Du siehst, ist Deine Tabelle zu breit.

Mein Vorschlag, falls Tabelle und Diagramm auf einer Seite erscheinen sollen:
\documentclass[12pt,table]{article}% Option table für das von pgfplots geladene xcolor

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[ngerman]{babel}
\usepackage{pgfplots}% lädt xcolor
\usepackage{caption}
\usepackage{tabularx}
\usepackage{booktabs}
\usepackage{showframe}

\pgfplotsset{
   compat=1.14,
   /pgf/number format/use comma,
   xlabel near ticks,
   ylabel near ticks
}

\begin{document}
\listoffigures
\listoftables

\newpage

\begin{center}
\begin{minipage}{\textwidth}
\centering
\scriptsize
\renewcommand{\arraystretch}{1.6}
\newcommand{\thead}[1]{\normalfont\bfseries #1}
\captionsetup{textfont=bf}
\captionof{table}{LIDL GmbH \& Co. KG}
\label{my-label}
\begin{tabularx}{\textwidth}{
	>{\bfseries\raggedright\hspace{0pt}}X
	*6{>{\itshape}r}
}
\toprule
Jahr                              & \thead{2010} & \thead{2011} & \thead{2012} & \thead{2013} & \thead{2014} & \thead{2015}\\
\midrule
Marktanteil (in \%)               & 24,4         &              & 24,4         & 25,8         & 26,7         & 26,6        \\
Bruttoumsatz (in Millionen Euro)  & 16600,--     & 16800,--     & 17905,--     & 19800,--     & 20460,--     & 20790,--    \\
Anz. der Filialen                 & 3202         & 3282         & 3292         & 3245         & 3203         & 3190        \\ 
Anz. der Mitarbeiter              & 84223        & 94019        & 96790        & 98821        & 110319       & 122879      \\
Flächenproduktivität (in~Euro/qm) &              &              &              &              &              & 6280,--     \\
Verkaufsfläche (in qm)            &              &              & 2700604      & 2663986      & 2716799      &             \\
\bottomrule
\end{tabularx}
\end{minipage}
\end{center}

\begin{center}
\begin{minipage}{\textwidth}
\centering
\begin{tikzpicture}[scale=.95, transform shape]
\begin{axis}[
	height=12cm,
	width=\linewidth,
	enlargelimits=0.01,
	legend style={
		at={(0.5,-0.2)},
		anchor=south,
		legend columns=-1
	},
	ymin=0,
	ymax=1.5,
	x tick label style={
		/pgf/number format/1000 sep=,
		rotate=45,
		anchor=east
	},
	ylabel={Prozent},
	ybar,
	bar width=7pt,
	xtick=data,
	enlarge x limits={abs=30pt},
	minor x tick num=1,
	grid=minor
]
\addplot coordinates {
(2010,1)
(2011,0)
(2012,1)
(2013,1.0573)
(2014,1.0943)
(2015,1.0902)
};
\addplot coordinates {
(2010,1)
(2011,1.012)
(2012,1.0786)
(2013,1.1928)
(2014,1.2325)
(2015,1.2524)
};
\addplot coordinates {
(2010,1)
(2011,1.025)
(2012,1.0281)
(2013,1.0134)
(2014,1.0003)
(2015,0.9963)
};
\addplot coordinates {
(2010,1)
(2011,1.1163)
(2012,1.1492)
(2013,1.1733)
(2014,1.3098)
(2015,1.4590)
};
\legend{Marktanteil, Bruttoumsatz, Anz. Filialen, Anz. Mitarbeiter}
\end{axis}
\end{tikzpicture}
\captionof{figure}{Beschriftung}
\end{minipage}
\end{center}
\end{document}

Namen für Diagramm vergeben und Anordnung einer Tabelle

von Basti88 » Do 17. Nov 2016, 16:09

Guten Tag,
wie gewünscht eröffne ich ein eigenes Thread.
Ich möchte gerne das die Tabelle oberhalb der Graphik ausgegeben wird und das ich der Graphik einen Namen zuweisen kann, sodass es im Abbildungsverzeichnis auftaucht, benötigt wird das für eine BA.
\documentclass[12pt]{article} 
\usepackage[T1]{fontenc} 
\usepackage{pgfplots} 
\usepackage{caption, booktabs} 
\usepackage[table,xcdraw]{xcolor} 

\begin{document} 
\begin{table}
\centering 
\caption{\textbf{LIDL GmbH $\&$ Co. KG}} 
\label{my-label} 
\begin{tabular}{@{}|l|c|c|c|c|c|c|@{}} 
\toprule 
\textbf{Jahr}                              & \textbf{2010}    & \textbf{2011}    & \textbf{2012}    & \textbf{2013}    & \textbf{2014}    & \textbf{2015}    \\ \midrule 
\textbf{Marktanteil (in \%)}               & \textit{24,4}    & \textit{}        & \textit{24,4}    & \textit{25,8}    & \textit{26,7}    & \textit{26,6}    \\ \midrule 
\textbf{Bruttoumsatz (in Millionen Euro)}  & \textit{16600,-} & \textit{16800,-} & \textit{17905,-} & \textit{19800,-} & \textit{20460,-} & \textit{20790,-} \\ \midrule 
\textbf{Anz. der Filialen}                 & \textit{3202}    & \textit{3282}    & \textit{3292}    & \textit{3245}    & \textit{3203}    & \textit{3190}    \\ \midrule 
\textbf{Anz. der Mitarbeiter}              & \textit{84223}   & \textit{94019}   & \textit{96790}   & \textit{98821}   & \textit{110319}  & \textit{122879}  \\ \midrule 
\textbf{Flächenproduktivität (in Euro/qm)} & \textit{}        & \textit{}        & \textit{}        & \textit{}        & \textit{}        & \textit{6280,-}    \\ \midrule 
\textbf{Verkaufsfläche (in qm)}            & \textit{}        & \textit{}        & \textit{2700604} & \textit{2663986} & \textit{2716799} & \textit{}        \\ \bottomrule 
\end{tabular} 
\end{table} 

\pgfplotsset{ 
   compat=1.13, 
   xlabel near ticks, 
   ylabel near ticks 
} 

   \begin{tikzpicture} 
     \begin{axis}[ 
       height=12cm, 
       width=\linewidth,   
       enlargelimits=0.01, 
       legend style={ 
         at={(0.5,-0.2)}, 
         anchor=north, 
         legend columns=-1 
       }, 
       ymin=0, 
       ymax=1.5, 
       x tick label style={/pgf/number format/1000 sep=}, 
       x tick label style={rotate=45,anchor=east}, 
       ylabel={Prozent}, 
       ybar, 
       bar width=7pt, 
       xtick=data, 
       enlarge x limits={abs=30pt}, 
      minor x tick num=1, 
      grid=minor 
     ] 
      \addplot coordinates { 
         (2010,1) 
         (2011,0) 
         (2012,1) 
         (2013,1.0573) 
         (2014,1.0943) 
         (2015,1.0902)   
       }; 
   \addplot coordinates { 
         (2010,1) 
         (2011,1.012) 
         (2012,1.0786) 
         (2013,1.1928) 
         (2014,1.2325) 
         (2015,1.2524)   
       }; 
     \addplot coordinates { 
         (2010,1) 
         (2011,1.025) 
         (2012,1.0281) 
         (2013,1.0134) 
         (2014,1.0003) 
         (2015,0.9963)   
       }; 
      \addplot coordinates { 
         (2010,1) 
         (2011,1.1163) 
         (2012,1.1492) 
         (2013,1.1733) 
         (2014,1.3098) 
         (2015,1.4590)   
       }; 
       \legend{Marktanteil, Bruttoumsatz, Anz. Filialen, Anz. Mitarbeiter} 
   \end{axis} 
   \end{tikzpicture}
\end{document}

Nach oben