Colorbar with diamond-shape blocks
Afficher commentaires plus anciens
Hello,
I want to plot a colorbar with customized shapes. When I execute the colorbar command, I get the following colorbar in which each block is rectangular-shaped.
However, I want to plot the colorbar in which each block has a diamond shape as shown in the following eample:

Is it possible to customize the shape of the grid boxes like this?
Any help will be greatly appreciated.
Regards,
AG
2 commentaires
Rik
le 24 Jan 2020
Colorbars used to be axes objects. You can take that as an inspiration and create your own replacement for the colorbar that uses a separate axes object and a bunch of calls to patch.
As far as I'm aware (especially in the more modern releases) it is not possible to achieve what you want with a colorbar object.
Spencer Chen
le 24 Jan 2020
I don't think you get that with vanilla Matlab. One way is to create your own colorbar axes and plot 'd' diamond markers.
Blessings,
Spencer
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Annotations dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

