Clear Filters
Clear Filters

How can I make a 3D bar chart for a 1044X22 array which is colored with height?

1 view (last 30 days)
When I do bar3(Data) for a 1044X21 array, I get this figure (pfa the data)
But I want to make a figure like this showing the colored bars clearly
  4 Comments

Sign in to comment.

Accepted Answer

Star Strider
Star Strider on 15 Jun 2022
I am not certain how clearly that sort of matrix can be defined
Try this —
Data = rand(1044,22);
figure
b = bar3(Data);
colorbar
axis square
for k = 1:length(b)
b(k).EdgeColor = 'none';
zdata = b(k).ZData;
b(k).CData = zdata;
b(k).FaceColor = 'interp';
end
.

More Answers (0)

Categories

Find more on Polar Plots in Help Center and File Exchange

Tags

Products


Release

R2018a

Community Treasure Hunt

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

Start Hunting!