Colorbar with diamond-shape blocks
이전 댓글 표시
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
Rik
2020년 1월 24일
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
2020년 1월 24일
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
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Polygons에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

