Set distance between the ticks in the colorbar

14 visualizaciones (últimos 30 días)
Sandesh Dube
Sandesh Dube el 26 de Oct. de 2020
Comentada: Adam Danz el 27 de Oct. de 2020
Hello,
I have created a contour map and a colorbar with manual ticks. The issue is with the ticks vector.
In the 1st figure, the values are equally spaced. Hence the ticks align with colors properly.
In the 2nd figure, the vectors are not spaced uequally for the 1st two and last two values. Hence, it does not align with colors.
PS: The number of colors and vector values is proper. Issue lies with the aligning only.
  3 comentarios
Sandesh Dube
Sandesh Dube el 27 de Oct. de 2020
Hi Adam,
I have tried to put tick labels separately. But they also were put at the same locations, as the ticks. And not at equal distances throughout the colorbar.
Can you illustrate the above with an example?
Adam Danz
Adam Danz el 27 de Oct. de 2020
The tick labels will always be at the location of the ticks. That's why you have to calculate the position of the ticks correctly.
Here's an example

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Colorbar en Help Center y File Exchange.

Productos


Versión

R2019b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by