von esdd » Mi 1. Mär 2017, 13:38
Die Umrandung der Säulen bekommst Du weg, in dem Du draw=none zu den Plotoptionen hinzufügst:
\addplot[fill=green,draw=none] coordinates {...};
Einen Zeilenumbruch in den Ticklabels an der x-Achse wird ermöglicht, wenn eine Textbreite und Textausrichtung für diese angegeben wird, beispielsweise:
x tick label style={rotate=30,anchor=north east,
text width=5cm,align=right
}
Eventuell ist es dann aber besser rotate=90,anchor=east zu verwenden:
\documentclass{article}
\usepackage{pgfplots}
\pgfplotsset{
compat=1.13,
}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
ybar,
bar width=20pt,
%
nodes near coords,
nodes near coords align=above,
point meta=rawy,
%
axis x line=bottom,
axis y line=left,
ymajorgrids=true,
%
ylabel=$\mathrm{kWh/m^2a}$,
ymin=0,
ytick={0,50,100,150,200,250,300},
enlargelimits=auto,
%
xlabel= Sanierter Geb\"audeteil,
symbolic x coords ={Unrenoviert sehr langer text text text,Fenster,H\"ulle,Bodenplatte,Heizung},
x tick label style={rotate=90,anchor=east,text width=5cm,align=right},
]
\addplot[fill=green,draw=none] coordinates {
(Unrenoviert sehr langer text text text,220.6)
(Fenster,219.26)
(H\"ulle,197.67)
(Bodenplatte,167.9)
(Heizung,40)
};
\end{axis}
\end{tikzpicture}
\end{document}
Die Umrandung der Säulen bekommst Du weg, in dem Du [tt]draw=none[/tt] zu den Plotoptionen hinzufügst:
[code]\addplot[fill=green,draw=none] coordinates {...};[/code]
Einen Zeilenumbruch in den Ticklabels an der x-Achse wird ermöglicht, wenn eine Textbreite und Textausrichtung für diese angegeben wird, beispielsweise:
[code]x tick label style={rotate=30,anchor=north east,
text width=5cm,align=right
}[/code]
Eventuell ist es dann aber besser [tt]rotate=90,anchor=east[/tt] zu verwenden:
[code]\documentclass{article}
\usepackage{pgfplots}
\pgfplotsset{
compat=1.13,
}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
ybar,
bar width=20pt,
%
nodes near coords,
nodes near coords align=above,
point meta=rawy,
%
axis x line=bottom,
axis y line=left,
ymajorgrids=true,
%
ylabel=$\mathrm{kWh/m^2a}$,
ymin=0,
ytick={0,50,100,150,200,250,300},
enlargelimits=auto,
%
xlabel= Sanierter Geb\"audeteil,
symbolic x coords ={Unrenoviert sehr langer text text text,Fenster,H\"ulle,Bodenplatte,Heizung},
x tick label style={rotate=90,anchor=east,text width=5cm,align=right},
]
\addplot[fill=green,draw=none] coordinates {
(Unrenoviert sehr langer text text text,220.6)
(Fenster,219.26)
(H\"ulle,197.67)
(Bodenplatte,167.9)
(Heizung,40)
};
\end{axis}
\end{tikzpicture}
\end{document}[/code]