von Bartman » Do 2. Nov 2017, 21:53
Der die Zeichnung betreffende Quelltext lässt sich offenbar auch noch etwas schlanker gestalten.
\documentclass[fontsize=12pt]{scrreprt}
\usepackage{pgfplotstable}
\pgfplotsset{compat=newest}
\usetikzlibrary{arrows.meta}
\definecolor{myorange}{rgb}{1,0.3,0}
\usepackage[ngerman]{babel}
\usepackage[utf8]{inputenc}
\usepackage{showframe}
\begin{document}
\begin{center}
\begin{minipage}{\linewidth}
\begin{tikzpicture}
\pgfplotstableread{
Jahr a b c d e f g h i j k l
{2011} 36 8 2 28 10 2 1 13 0 0 29 26
{2012} 37 16 2 37 9 2 1 11 0 0 26 32
{2013} 39 15 0 34 8 3 5 13 0 0 25 27
{2014} 35 15 4 35 8 3 6 11 2 0 22 28
{2015} 33 19 4 43 8 2 10 10 3 0 18 31
{2016} 32 16 6 47 9 4 11 10 5 0 22 42
{2017} 33 15 8 56 7 4 12 11 7 2 26 41
}{\data}
\pgfplotscreateplotcyclelist{color list}{
myorange,black,violet,teal,purple,blue,olive,lime,brown,magenta,cyan,gray
}
\begin{axis}[
width=.97\textwidth,
height=20cm,
axis lines=left,
ylabel={Anzahl},
ymin=0,ymax=70,
legend pos=north west,% <- eingefügt
grid=major,
xlabel={Jahr},
xtick=data,
every axis plot/.append style={mark=*},% <- eingefügt
xticklabel style={/pgf/number format/1000 sep=},
cycle list name=color list
]
\foreach \columnindex in {1,...,12} {
\addplot table [y index=\columnindex] {\data};
}
\legend{a,b,c,d,e,f,g,h,i,j,k,l}
\end{axis}
\end{tikzpicture}
\captionof{figure}{Text.}
\end{minipage}
\end{center}
\end{document}
Der die Zeichnung betreffende Quelltext lässt sich offenbar auch noch etwas schlanker gestalten.
[code]\documentclass[fontsize=12pt]{scrreprt}
\usepackage{pgfplotstable}
\pgfplotsset{compat=newest}
\usetikzlibrary{arrows.meta}
\definecolor{myorange}{rgb}{1,0.3,0}
\usepackage[ngerman]{babel}
\usepackage[utf8]{inputenc}
\usepackage{showframe}
\begin{document}
\begin{center}
\begin{minipage}{\linewidth}
\begin{tikzpicture}
\pgfplotstableread{
Jahr a b c d e f g h i j k l
{2011} 36 8 2 28 10 2 1 13 0 0 29 26
{2012} 37 16 2 37 9 2 1 11 0 0 26 32
{2013} 39 15 0 34 8 3 5 13 0 0 25 27
{2014} 35 15 4 35 8 3 6 11 2 0 22 28
{2015} 33 19 4 43 8 2 10 10 3 0 18 31
{2016} 32 16 6 47 9 4 11 10 5 0 22 42
{2017} 33 15 8 56 7 4 12 11 7 2 26 41
}{\data}
\pgfplotscreateplotcyclelist{color list}{
myorange,black,violet,teal,purple,blue,olive,lime,brown,magenta,cyan,gray
}
\begin{axis}[
width=.97\textwidth,
height=20cm,
axis lines=left,
ylabel={Anzahl},
ymin=0,ymax=70,
legend pos=north west,% <- eingefügt
grid=major,
xlabel={Jahr},
xtick=data,
every axis plot/.append style={mark=*},% <- eingefügt
xticklabel style={/pgf/number format/1000 sep=},
cycle list name=color list
]
\foreach \columnindex in {1,...,12} {
\addplot table [y index=\columnindex] {\data};
}
\legend{a,b,c,d,e,f,g,h,i,j,k,l}
\end{axis}
\end{tikzpicture}
\captionof{figure}{Text.}
\end{minipage}
\end{center}
\end{document}[/code]