# How to correctly set a colorbar for an external graphic? [closed]

I created a pdf file from a Matlab imagesc plot. I have remove the colorbar and axis and now I want to have this image in my tex document. I manged to get the axes almost as I want them, but the colorbar won't work. There is no error, but also no colorbar. What am I missing?

\documentclass[a4paper,10pt]{scrartcl}

\usepackage{pgfplots}

\begin{document}

\begin{tikzpicture}
\begin{axis}[axis on top,title=Test,colormap/jet]
{image.pdf};
\end{axis}
\end{tikzpicture}

\end{document}

-

## closed as too localized by Jake, Martin Tapankov, Claudio Fiandrino, zeroth, lockstepMar 15 '13 at 17:08

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

You forgot to supply colorbar, i.e. \begin{axis}[colorbar, axis on... – Psirus Mar 12 '13 at 11:58
@Psirus: That was easy... Thanks :) – Anke Mar 12 '13 at 12:38
Well, I just realized that I have a nice colorbar, but the labels are wrong. I gave the zmin and zmax because I thought this would make it right, but apparently it doesn't... My image is a Matlab imagesc plot, so I have x and y, but the color indicates height. How do I change labels on a colorbar? – Anke Mar 12 '13 at 12:50
You could try \addplot[point meta min=0, point meta max=0.5] graphics[xmin=0,... – Psirus Mar 12 '13 at 13:14
@Psirus: Ah, thanks. This is perfect :) – Anke Mar 12 '13 at 13:23