Barplot with extra information

1 view (last 30 days)
Lene
Lene on 31 Jan 2014
Commented: Amit on 31 Jan 2014
Hello,
I am currently writing my bachelorthesis and have to create some barplots. Unfortunately I have no clue how to use matlab. I could teach myself enough vor simple barplot but now my Prof wants me to include more information. In detail I have to include whether so Bars are significantly distinct
I found some info about how to do that in this page: http://tinyurl.com/l6dbpwx but actually I have absolutely no clue how to perform this on my plot.... I'm really not talented with such things....
Thats my code for the Graph:
if true
% code
% Grafiken Hit-rate, dprime, Rt%
clear all; close all; clc; % ******************* %
%d-Primes MF_10 % alpha: 1,64, Theta: 1.6; Gamma:1.59; Steady: 1.76% %Z = [1.64; 1.6; 1.59; 1.76];
% subplot(2,2,1), plot(Z) %bar(Z) % title('d-primes Exp. 1') %ylabel('d-primes') %set(gca, 'XTickLabel', {'Alpha','Theta','Gamma','Steady'})
% Hit Rates MF_11, splitted: Remember/know % Remember theta: 27,6; alpha: 27,4; Steady 27,5 % % Know theta 23,5; alpha: 21,3; Steady 27,8 % Y = [ 27.6, 23.5; 27.4, 21.3; 27.5, 27.8 ]; subplot(1,3,1),plot(Y) f= bar(Y) %title('Hit-Rates') ylabel('Hit-Rate') set(gca,'XTickLabel',{'Theta','Alpha','Steady'}) legend('Remember','Know','Location', 'SouthEast') set(f(1), 'FaceColor', [36,36,36]/265) set(f(2), 'FaceColor', [122,139,139]/256)
%d-prime values MF_11 splitted %
%rem theta: .41; alpha: .42; steady: .42
%know theta: 1.15; alpha: 1.08; Steady: 1.33
YY = [ 0.41, 1.15;
0.42, 1.08;
0.42, 1.33 ];
subplot(1,3,2),plot(YY)
g= bar(YY)
%title('d-Primes')
ylabel('d-Primes')
set(gca,'XTickLabel',{'Theta','Alpha','Steady'})
legend('Remember','Know','Location', 'SouthEast')
set(g(1), 'FaceColor', [36,36,36]/265)
set(g(2), 'FaceColor', [122,139,139]/256)
%RT MF_11 splitted % erst know, dann remember
y = [ 0.45, 0.43;
0.45, 0.43;
0.47, 0.40 ];
subplot(1,3,3),plot(y)
h=bar(y)
%title('RT')
ylabel('RT')
set(gca,'XTickLabel',{'Theta','Alpha','Steady'})
legend('Remember','Know','Location', 'SouthEast')
%h = bar(y,'stacked');
set(h(1), 'FaceColor', [36,36,36]/265)
set(h(2), 'FaceColor', [122,139,139]/256)
end
For example I would need those stars between all three know-bars (grey) in the first subplot. I hope someone can help me with this.
Best, Lene

Answers (0)

Categories

Find more on Discrete Data 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!