Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- documentclass[varwidth=false, border=2pt]{standalone}
- usepackage[utf8]{inputenc} % this is needed for umlauts
- usepackage[ngerman]{babel} % this is needed for umlauts
- usepackage[T1]{fontenc} % this is needed for correct output of umlauts in pdf
- usepackage[margin=2.5cm]{geometry} %layout
- usepackage{pgfplots}
- usepgfplotslibrary{dateplot}
- usetikzlibrary{pgfplots.dateplot}
- begin{document}
- begin{tikzpicture}
- begin{axis}[
- date coordinates in=x,
- xticklabel={year},
- x tick label style={align=center, rotate=45},
- yticklabel=$pgfmathprintnumber{tick}$,%,
- date ZERO=1946-06-30,
- xmin={1946-01-01},
- xmax={2010-01-01},
- extra y ticks={5},
- /pgfplots/ytick={0,10,...,100},
- ymin=0, ymax=100,
- width=15cm, height=8cm, % size of the image
- grid = major,
- grid style={dashed, gray!30},
- legend style={at={(1.15,1)}, anchor=north}
- ]
- addplot[blue, dashed, mark=triangle*] table [x=Wahltag, y=Wahlbeteiligung, col sep=comma] {landtagswahlen-in-bayern.csv};
- addplot[black,mark=square*] table [x=Wahltag, y=CSU, col sep=comma] {landtagswahlen-in-bayern.csv};
- addplot[red,mark=square*] table [x=Wahltag, y=SPD, col sep=comma] {landtagswahlen-in-bayern.csv};
- addplot[green,mark=square*] table [x=Wahltag, y=GRÜNE, col sep=comma] {landtagswahlen-in-bayern.csv};
- addplot[yellow,mark=square*] table [x=Wahltag, y=FDP, col sep=comma] {landtagswahlen-in-bayern.csv};
- legend{Wahlbeteiligung,CSU,SPD,Grüne,FDP}
- end{axis}
- end{tikzpicture}
- end{document}
- documentclass[varwidth=false, border=2pt]{standalone}
- usepackage[utf8]{inputenc} % this is needed for umlauts
- usepackage[ngerman]{babel} % this is needed for umlauts
- usepackage[T1]{fontenc} % this is needed for correct output of umlauts in pdf
- usepackage[margin=2.5cm]{geometry} %layout
- usepackage{pgfplots}
- usepgfplotslibrary{dateplot}
- usetikzlibrary{pgfplots.dateplot}
- begin{document}
- begin{tikzpicture}
- begin{axis}[
- date coordinates in=x,
- xticklabel={year},
- x tick label style={align=center, rotate=45},
- yticklabel=$pgfmathprintnumber{tick}$,%,
- date ZERO=1946-06-30,
- xtick={1946-01-01,1950-01-01,1954-01-01,1958-01-01,1962-01-01,1966-01-01,1970-01-01,1974-01-01,
- 1978-01-01,1982-01-01,1986-01-01,1990-01-01,1994-01-01,1998-01-01,2002-01-01,2006-01-01,2010-01-01},
- xmin={1946-01-01},
- xmax={2010-01-01},
- extra y ticks={5},
- /pgfplots/ytick={0,10,...,100},
- ymin=0, ymax=100,
- width=15cm, height=8cm, % size of the image
- grid = major,
- grid style={dashed, gray!30},
- legend style={at={(1.15,1)}, anchor=north}
- ]
- % addplot[blue, dashed, mark=triangle*] table [x=Wahltag, y=Wahlbeteiligung, col sep=comma] {landtagswahlen-in-bayern.csv};
- % addplot[black,mark=square*] table [x=Wahltag, y=CSU, col sep=comma] {landtagswahlen-in-bayern.csv};
- % addplot[red,mark=square*] table [x=Wahltag, y=SPD, col sep=comma] {landtagswahlen-in-bayern.csv};
- % addplot[green,mark=square*] table [x=Wahltag, y=GRÜNE, col sep=comma] {landtagswahlen-in-bayern.csv};
- % addplot[yellow,mark=square*] table [x=Wahltag, y=FDP, col sep=comma] {landtagswahlen-in-bayern.csv};
- % legend{Wahlbeteiligung,CSU,SPD,Grüne,FDP}
- end{axis}
- end{tikzpicture}
- end{document}
- Package pgfplots notification 'compat/show suggested version=true': document ha
- s been generated with the most recent feature set (pgfplotsset{compat=1.10}).
- PGFPlots: reading {landtagswahlen-in-bayern.csv}
- ! Undefined control sequence.
- GenericError ...
- #4 errhelp @err@ ...
- l.32 ...sep=comma] {landtagswahlen-in-bayern.csv};
- The control sequence at the end of the top line
- of your error message was never def'ed. If you have
- misspelled it (e.g., `hobx'), type `I' and the correct
- spelling (e.g., `Ihbox'). Otherwise just continue,
- and I'll forget about whatever was undefined.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement