How can I make a 3D bar chart for a 1044X22 array which is colored with height?
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
Aditya Tripathi
il 15 Giu 2022
Commentato: Star Strider
il 15 Giu 2022
When I do bar3(Data) for a 1044X21 array, I get this figure (pfa the data)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1032790/image.bmp)
But I want to make a figure like this showing the colored bars clearly![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1032795/image.jpeg)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1032795/image.jpeg)
4 Commenti
KSSV
il 15 Giu 2022
bar3(Data)
ylim(500 560])
As the data is very fine, you cannot see colors..you need to zoom.
Risposta accettata
Star Strider
il 15 Giu 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
.
2 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Polar Plots in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!