TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

With the risk of sounding foolish, but I can't seem to find the answer anywhere. How can I set the ticklabels for the colorbar? Let's say I have the following code:

                xmin=1, xmax=2,
                ymin=1, ymax=2,
                colorbar,point meta min=0.3,point meta max=5.5]
            \addplot [color=black]

You'll notice the labels for the colorbar are 1, 2, 3, 4 and 5. What if I would want for instance the random 0.3, 0.6, 1, ... , 5.5?


share|improve this question
up vote 1 down vote accepted

Section 4.8.12 of the pgfplots manual explains how to configure the colorbar style. In your case, that's

colorbar style={ ytick={0.3, 0.6, 1, 5.5} }
share|improve this answer
So simple, nice! Thanks. – Blaatschaap Aug 29 '12 at 9:34

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.