# How to individually customise tick marks and labels in histogram

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,
]
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
};
\end{axis}
\end{tikzpicture}
\end{document}


This would be what I would like to achieve:

Thank you in advance for the help!

I would just add them "by hand", i.e. using a loop.

\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,
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,
]
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
};
\foreach \X [count=\Y] in {1.10,1.38,1.62}
{\edef\temp{\noexpand\draw[ultra thick] (axis cs:\X,0) -- (axis cs:\X,8.8-\Y) node[anchor=south
west,xshift=-2ex,font=\noexpand\sffamily]{label \Y} ;}
\temp} % axis cs: is not needed for pgfplots compat=1.11 or higher
\end{axis}
\end{tikzpicture}
\end{document}


• As always, perfect answers. Thank you so much! Jan 30 '20 at 4:34
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.7965683937072754, "perplexity": 8659.330148395615}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 5, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2021-39/segments/1631780057119.85/warc/CC-MAIN-20210920221430-20210921011430-00386.warc.gz"}