Hold on command does not work for boxplot and additional plot
11 views (last 30 days)
Show older comments
Hello all,
I've got a boxplot (with horizontal orientation) with data:
a= [x1;x2;x3;x4;x5;x6;x7;x8;x9;x10;x11;x12;x13;x14;x15]
and the boxplot groups are defined by vector b, where b is:
b = [0*ones(size(x1)); 0.1*ones(size(x2)); 0.2*ones(size(x3)); 0.3*ones(size(x4)); 0.4*ones(size(x5)); 0.5*ones(size(x6)); 0.6*ones(size(x7)); 0.7*ones(size(x8)); 0.8*ones(size(x9)); 0.9*ones(size(x10)); 1.0*ones(size(x11)); 1.1*ones(size(x12)); 1.2*ones(size(x13)); 1.5*ones(size(x14)); 1.6*ones(size(x15))];
where, the positions 0, 0.1, 0.2, 0.3, 0.4......., 1.6 are the positions that my horizontal boxplots are taking on the y axis.
----------
I want to overlap a plot with 5 points say c=[0.3, 0.4, 0.5, 0.6, 0.7] at y=2.
------------
So, when I'm typing
figure
boxplot(a,b,'orientation','horizontal')
hold on
plot(c,2*ones(size(c)),'g.')
it does not work and only the boxplots are shown, but not my 5 points (that are above the highest y value of the boxplots, which is 1.6).
Any ideas of how I could resolve this?
0 Comments
Answers (1)
See Also
Categories
Find more on Line 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!