[major tick length] does not work inside [xtick style]
Brought to you by:
cfeuersaenger,
ludewich
There is no easy way to adjust the tick length per axis:
Setting major tick length inside xtick style gives an error.
there is no major x tick length option or similar
see https://tex.stackexchange.com/q/445355/19326 or MWE:
\documentclass{article}
\usepackage{pgfplots}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
tick align=outside,
xtick={1,6},
xticklabels={a,b},
ytick={0.5,0.6,0.7,0.8,0.9,1.0},
major tick length=1ex%,
xtick style={major tick length=2pt},
% x major tick length=0ex
]
\addplot plot coordinates {
(1,0.5)
(6,1)
};
\end{axis}
\end{tikzpicture}
\end{document}
Propably this is only a consistency issue, as I learned on tex.stackexchange
xtick style={/pgfplots/major tick length=2pt}works, however to naive users like me it is unclear whyextra x tick style={major tick length=2pt},works without the/pgfplots/path andxtick styledoes not.Is https://tex.stackexchange.com/q/445655/95441 a related issue?
From what I read I would say no:
The question you link talks about a TIKZ style being (mostly) ignored with groupplots, while my report is about the "/pgfplots/" path not being searched under certain conditions, giving unexpected behaviour. While both cases are about unexpected behaviour, I assume they have very different root causes (however my understanding of the inner workings of tikz is very limited.
For the record: I opened bug #208 for this.