I created a contour plot from my data, the first image below shows the bar chart which I am getting but I need it to look like the second image (I created by paint) the first number should start from zero and go up one by one, how can I do that? enter image description here

enter image description here

  • 1
    $\begingroup$ Do you want discrete steps or a continuous gradient? $\endgroup$
    – Mr.Wizard
    Feb 28, 2017 at 15:26
  • $\begingroup$ Discrete, distance between each step should be 1. $\endgroup$
    – Parviz
    Feb 28, 2017 at 15:27
  • $\begingroup$ I that case you are going to run into this issue: (85444) $\endgroup$
    – Mr.Wizard
    Feb 28, 2017 at 15:31

1 Answer 1


With BarLegend patched according to BarLegend can't make spaced contours when contours number>11 please try:

BarLegend[{"Rainbow", {0, 13}}, Range[0, 13]]


BarLegend[{"Rainbow", {0, 13}}, Range[0, 12, 1/2]]

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