Colorbar with diamond-shape blocks
Mostrar comentarios más antiguos
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 comentarios
Rik
el 24 de En. de 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
el 24 de En. de 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
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Polygons en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

