I need to mark three x values in a histogram. I thought a way would be introducing extra x ticks
and customising major tick length
and thickness so they show up more conspicuously. Is it possible to assign different length and thickness to each of them, and if so can I get some help with that?
Additionally, I would like each tick label to he different. When I introduce xticklabel
if allocates the same label to all the extra ticks. How can I give each extra x tick a different label?
this is my code so far:
\documentclass[border=0.2mm]{standalone}
\usepackage{helvet}
\usepackage[eulergreek]{sansmath}
\usepackage{pgfplots}
\pgfplotsset{ compat=1.9, every axis/.style={axis on top}}
\usetikzlibrary{patterns}
\makeatletter
\begin{document}
\begin{tikzpicture}
\begin{axis}[ybar,
width=7.5cm,
ymax=10,
xmax=3,
xticklabel style = {font=\sansmath\sffamily},
yticklabel style = {font=\sansmath\sffamily},
xtick pos=left,
ytick pos=left,
extra x ticks = {1.10,1.38,1.62},
extra x tick style={
xticklabel={\footnotesize SC},
xticklabel style={above, rotate=45,ultra thick,yshift=65, xshift=75},
tick align=inside,
major tick length=95},
every axis label = {font=\sansmath\sffamily},
xlabel={xxxx},
ylabel={yyyy},
legend style = {anchor=north east,
nodes={scale=0.75,transform shape},
font=\sansmath\sffamily},
label style = {font=\sansmath\sffamily},
enlarge y limits=-0.5,
]
\addplot+[hist={data=x,bins=9,data max=2,data min=-2.6},black!30, fill=black!30]
table [y expr=1] {
2
0.5
2
-1.2
-0.3
-2
-1.55
0.2
-0.1
-1.4
1.1
-2
-2
-1
-2
0.5
1.7
2
0.33
-2
0.22
-2
-1
-1
0.2
1
2
-1
1.1
2
-1.3
-1.22
-2
0.33
0.22
1
0.1
};
\addlegendimage{empty legend},
\addlegendentry{aaaa},
\end{axis}
\end{tikzpicture}
\end{document}
This would be what I would like to achieve:
Thank you in advance for the help!