Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

boxplot color and line width

1,328 views
Skip to first unread message

Cindy Zhang

unread,
Nov 12, 2009, 5:24:03 PM11/12/09
to
Hi, I have learned how to change linewidth of boxplots from previous posts. But the box can no longer be seen if I use the following commands

bp = boxplot(weight);
for i = 1:size(bp,2), set(bp(:,i),'linewidth',wd(i)); end

In this case, how to distinguish box? Maybe we can make the box and whisker of different color? Help please!

Thanks much!
Cindy

Pekka Kumpulainen

unread,
Nov 13, 2009, 2:57:04 AM11/13/09
to
"Cindy Zhang" <cccin...@gmail.com> wrote in message <hdi1u3$eun$1...@fred.mathworks.com>...

doc boxplot

"To modify graphics properties of a box plot component, use findobj with the 'Tag' property to find the component's handle. 'Tag' values for box plot components depend on parameter settings, and are listed in the table below."

Cindy

unread,
Nov 13, 2009, 12:58:03 PM11/13/09
to
Thanks so much, Pekka! I haven't done much of adjusting plot properties in MATLAB. So this experience helps. Anyway the solution is

h = findobj('Tag','Box');
set(h,'Color','r');


"Pekka Kumpulainen" <pekka.nospam...@tut.please.fi> wrote in message <hdj3gg$r1k$1...@fred.mathworks.com>...

0 new messages