# Using pictures / images as x-axis label in pgfplot?

is it somehow possible to use external pictures as explicit labels in pgfplot? Or can I use the draw environment within the label definition?

I tried it in two ways:

\begin{tikzpicture}
\begin{axis}[
xlabel={Motifs},
ylabel={Value},
xtick={1,2},
xticklabels={%
\draw (0,0) node {} -- (2,4) node {} -- (4,0) node {};, %
\begin{tikzpicture}[thick,xscale=0.2,yscale=0.2]%
\draw (0,0) node {} -- (2,4) node {} -- (4,0) node {} -- (0,0);
\end{tikzpicture}
}
]
table[x=motif,y=original]
{
motif   target  original    reached
2   0.0 0.36755204594400576 0.0
1   1.0 0.6324479540559943  1.0
};
\end{axis}
\end{tikzpicture}


The result should look like this

Thanks in advance for any hints or tips!

• Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format. – user11232 Apr 9 '15 at 16:44

Have you tried this?

\documentclass{standalone}
\usepackage{pgfplots}
\usepgfplotslibrary{fillbetween}
\usetikzlibrary{patterns}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
xlabel={Motifs},
ylabel={Value},
xtick={1,2},
xticklabels={\includegraphics[scale=0.05]{example-image-a},\includegraphics[scale=0.05]{example-image-b}
}
]