I'm pretty desperate with a problem I have right now. I'm trying to create a lollipop plot that has different categories on the y-axis and occurrences on the x-axis. According to the below code. Note that I use https://github.com/nschloe/matplotlib2tikz to convert matplotlib plots to tikz/pgfplot. Now I have the problem that the text is too long for some categories on the Y-tick labels and must therefore be breaked, because elswise the plot would reach out of the document (The width of the plot is only altering the plot itself but not the text size). I use the y tick label style "text width" to break the lines here. Since I have about 16 of these diagrams, I want them to be about 5 cm high, as they would take up too much space in the document if they were higher. As you can see, when you wrap a line, the distance between the new line is greater than the distance between the tick label to the upper and lower tick labels.
Now to my question: Is there a way that I can reduce the distance between two lines of a tick label?
\documentclass[10pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{pgfplots}
\begin{document}
\begin{tikzpicture}
\definecolor{color0}{rgb}{0.529411764705882,0.807843137254902,0.92156862745098}
\definecolor{color1}{rgb}{0.12156862745098,0.466666666666667,0.705882352941177}
\begin{axis}[
height=5cm,
tick align=outside,
tick pos=left,
width=\textwidth,
x grid style={white!69.01960784313725!black},
xmajorgrids,
xmin=-0.4, xmax=8.4,
y grid style={white!69.01960784313725!black},
y tick label style ={anchor=east, text width={5cm}},
ymin=-0.45, ymax=5.45,
ytick={0,1,2,3,4,5},
yticklabels={This is some long text,This is some quite long text,This is some very long text that might break,This is some long text,This is some long text,Short text}
]
\path [draw=color0, semithick] (axis cs:0,0)
--(axis cs:8,0);
\path [draw=color0, semithick] (axis cs:0,1)
--(axis cs:6,1);
\path [draw=color0, semithick] (axis cs:0,2)
--(axis cs:3,2);
\path [draw=color0, semithick] (axis cs:0,3)
--(axis cs:3,3);
\path [draw=color0, semithick] (axis cs:0,4)
--(axis cs:3,4);
\path [draw=color0, semithick] (axis cs:0,5)
--(axis cs:3,5);
\addplot [semithick, color1, mark=*, mark size=3, mark options={solid}, only marks, forget plot]
table [row sep=\\]{%
8 0 \\
6 1 \\
3 2 \\
3 3 \\
3 4 \\
3 5 \\
};
\end{axis}
\end{tikzpicture}
\end{document}