Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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]
 \addplot graphics[xmin=0,xmax=1,ymin=0,ymax=1,zmin=0,zmax=.5]
   {image.pdf};
\end{axis}
\end{tikzpicture}

\end{document}
share|improve this question

closed as too localized by Jake, Martin Tapankov, Claudio Fiandrino, zeroth, lockstep Mar 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.

5  
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
1  
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
3  
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

Browse other questions tagged or ask your own question.