How to remove box in heatmap ?

10 views (last 30 days)
도현 김
도현 김 on 29 Mar 2021
Edited: Walter Roberson on 29 Mar 2021
example )
plot(1:10)
set(gca,'box','off')
%%%%%%%%%%%
i want )
h = rand(10)
heatmap(h,'box','off') ...... but cannot use 'box' in heamap.
I want to remove the outline.
Could there be any way ?

Accepted Answer

Walter Roberson
Walter Roberson on 29 Mar 2021
Edited: Walter Roberson on 29 Mar 2021
Possibly, but it would not be easy. You would have to use struct() on the heatmap object in order to get at internal parts of it, and you would have to figure out exactly which internal part to change.
For example it turns out you can change some of the text by recording the heatmap handle (call it HH) and altering
HH.NodeChildren(1).NodeChildren(1).String
but
HS = struct(HH);
HS.Axes.Box = 'off'
has no effect.
and digging in to
HS = struct(HH);
Hg = struct(HS.Heatmap.Grid);
and trying to set the grid properties has no visible effect.
heatmap objects are unfortunately barely customizable through supported interfaces.

More Answers (0)

Categories

Find more on Data Distribution Plots in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!