3D bar plot with patterns
Afficher commentaires plus anciens
Hi, I have got to know great work for on "applyhatch" a 2D bar plot. (https://blogs.mathworks.com/pick/2011/07/15/creating-hatched-patches/?s_tid=srchtitle)
However, this seems applicable when we use bar function instead of bar3. I was wondering if there is a way to draw different patterns for bar3. For example, the attached picture, instead of different colors, I want different patterns ('/','+','d' et al). How could I achieve that? Thanks for your help!
output = [0,0.497,0.487,0.677,0.418;1,0.234,0.295,0.168,0.312;2,0.089,0.102,0.071,0.128;3,0.064,0.061,0.038,0.065;... 4,0.039,0.026,0.018,0.03;5,0.028,0.01,0.007,0.02;6,0.049,0.019,0.021,0.027];
figure (1);
bar3(0:1:6,output(:,2:end)*100);
ylim([-0.5,6.5]);zlim([0,70]);
ylabel('Number of choices');zlabel('%Frequency');
set(gca,'YTickLabel',{'0','1','2','3','4','5','6+'});
set(gca,'XTickLabel',{'G(1)-informed','G(1)-uninformed','G(2)-informed','G(2)- uninformed'});
2 commentaires
KALYAN ACHARJYA
le 22 Jan 2018
Instead of color fill, you want it should be filled with pattern, am I right?
Yuanji Wen
le 23 Jan 2018
Réponses (0)
Catégories
En savoir plus sur Data Distribution Plots dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!