2

enter image description here

\documentclass{article} 
\usepackage{pgfplots}
\pgfplotsset{
   compat=newest,
   axispower/.style={
    xbar,
    y axis line style={ opacity=0 },
    axis x line=none,
    tickwidth=0pt,
    xmin=0,
    y=20pt,
    nodes near coords,
    bar shift=0pt,
  }
}
\begin{document}

\section{Notification-System} \label{results1}
\begin{tikzpicture}
  \begin{axis}[axispower, symbolic y coords={Chat,Email,SMS,Web,Carrier pigeon}]
  \addplot coordinates {(230,Carrier pigeon) (68,Web) (22,SMS) (50,Email) (52,Chat)};
  \end{axis}
\end{tikzpicture}

\end{document}
1

Alternatively ytick distance=1, which works better for the case when not all symbolic coords are present in the first \addplot.

\documentclass{article} 
\usepackage{pgfplots}
\pgfplotsset{
   compat=newest,
   axispower/.style={
    xbar,
    y axis line style={ opacity=0 },
    axis x line=none,
    tickwidth=0pt,
    xmin=0,
    y=20pt,
    nodes near coords,
    bar shift=0pt,
    ytick distance=1  % <-- added
  }
}
\begin{document}

\section{Notification-System} \label{results1}
\begin{tikzpicture}
  \begin{axis}[axispower, symbolic y coords={Chat,Email,SMS,Web,Carrier pigeon}]
  \addplot coordinates {(230,Carrier pigeon) (68,Web) (22,SMS) (50,Email) (52,Chat)};
  \end{axis}
\end{tikzpicture}

\end{document}
|improve this answer|||||
2

Add ytick=data to the axispower style.

enter image description here

\documentclass{article} 
\usepackage{pgfplots}
\pgfplotsset{
   compat=newest,
   axispower/.style={
    xbar,
    y axis line style={ opacity=0 },
    axis x line=none,
    tickwidth=0pt,
    xmin=0,
    y=20pt,
    nodes near coords,
    bar shift=0pt,
    ytick=data, %       <-- added
  }
}
\begin{document}

\section{Notification-System} \label{results1}
\begin{tikzpicture}
  \begin{axis}[axispower, symbolic y coords={Chat,Email,SMS,Web,Carrier pigeon}]
  \addplot coordinates {(230,Carrier pigeon) (68,Web) (22,SMS) (50,Email) (52,Chat)};
  \end{axis}
\end{tikzpicture}

\end{document}
|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for?Browse other questions tagged or ask your own question.