von markusv » Mi 8. Nov 2017, 21:09
Hallo.
\addplot[ybar] für hilft dir sicherlich weiter:
\documentclass[12pt,a4paper]{report}
\usepackage{pgfplotstable}
\pgfplotsset{compat=newest}
\usetikzlibrary{arrows.meta}
\definecolor{my_orange}{rgb}{1,0.5,0}
\usepackage{caption}
\usepackage[ngerman]{babel}
\usepackage[utf8]{inputenc}
\usepackage{blindtext}
\begin{document}
\begin{center}
\begin{minipage}{\linewidth}
\begin{tikzpicture}
\pgfplotstableread{
Jahr I II III
{01} 20 110 40
{02} 40 120 50
{03} 60 130 20
{04} 80 140 31
{05} 100 150 12
{06} 120 160 70
{07} 140 170 34
{08} 160 180 46
}{\data}
\begin{axis}[
width=.95\textwidth,
height=9cm,
axis lines=left,
ylabel={Anzahl},
grid=major,
xlabel={Jahr},
xtick=data,
xticklabel style={/pgf/number format/1000 sep=},
enlargelimits=0.03,%ergänzt
]
\addplot [my_orange, mark=*] table [x=Jahr, y=I] {\data};
\addplot [mark=*] table [x=Jahr, y=II] {\data};
\addplot [ybar,blue,fill] table [x=Jahr, y=III] {\data};
\end{axis}
\end{tikzpicture}
\captionof{figure}{Beschriftung}
\end{minipage}
\end{center}
\end{document}
Hallo.
[tt]\addplot[ybar][/tt] für hilft dir sicherlich weiter:
[code]\documentclass[12pt,a4paper]{report}
\usepackage{pgfplotstable}
\pgfplotsset{compat=newest}
\usetikzlibrary{arrows.meta}
\definecolor{my_orange}{rgb}{1,0.5,0}
\usepackage{caption}
\usepackage[ngerman]{babel}
\usepackage[utf8]{inputenc}
\usepackage{blindtext}
\begin{document}
\begin{center}
\begin{minipage}{\linewidth}
\begin{tikzpicture}
\pgfplotstableread{
Jahr I II III
{01} 20 110 40
{02} 40 120 50
{03} 60 130 20
{04} 80 140 31
{05} 100 150 12
{06} 120 160 70
{07} 140 170 34
{08} 160 180 46
}{\data}
\begin{axis}[
width=.95\textwidth,
height=9cm,
axis lines=left,
ylabel={Anzahl},
grid=major,
xlabel={Jahr},
xtick=data,
xticklabel style={/pgf/number format/1000 sep=},
enlargelimits=0.03,%ergänzt
]
\addplot [my_orange, mark=*] table [x=Jahr, y=I] {\data};
\addplot [mark=*] table [x=Jahr, y=II] {\data};
\addplot [ybar,blue,fill] table [x=Jahr, y=III] {\data};
\end{axis}
\end{tikzpicture}
\captionof{figure}{Beschriftung}
\end{minipage}
\end{center}
\end{document}[/code]