How to fill a bar graph with colored (hatching) patterns?
Ältere Kommentare anzeigen
Y = xlsread('Data');
X = Y(:,1);
Y1 = Y(:,2);
Y2 = Y(:,3);
figure('Name','Data - Bar Chart');
bar(X,Y1,1.0,'FaceColor','b');
hold on
bar(X,Y2,0.5,'FaceColor','r');
legend('Data 1','Data 2')
% Please suggest how to fill the bar graph here. Thanks in advance.
Antworten (1)
M
am 1 Nov. 2017
0 Stimmen
I am not sure it is implemented in Matlab (maybe using the 'stacked' option of bar graph, you can have a look here ).
Otherwise, I think you can find what you want on the MathWorks File Exchange site : https://fr.mathworks.com/matlabcentral/fileexchange/?utf8=%25E2%259C%2593&term=hatched+bar+graph
Kategorien
Mehr zu Bar Plots finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!