Menu

#207 [major tick length] does not work inside [xtick style]

v1.0 (example)
open
nobody
None
5
2018-08-20
2018-08-09
No

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}

Discussion

  • Malte Vesper

    Malte Vesper - 2018-08-10

    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 why extra x tick style={major tick length=2pt}, works without the /pgfplots/ path and xtick style does not.

     
  • Stefan Pinnow

    Stefan Pinnow - 2018-08-13
     
    • Malte Vesper

      Malte Vesper - 2018-08-13

      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.

       
      • Stefan Pinnow

        Stefan Pinnow - 2018-08-20

        For the record: I opened bug #208 for this.

         
MongoDB Logo MongoDB