フィルターのクリア

Median line representation in boxplot

22 ビュー (過去 30 日間)
Divya
Divya 2013 年 6 月 14 日
I converted the boxplot color to black. So i want to distinguish median with different pattern. I tried giving notch option to boxplot. But that does not look nice. Is there any way to represent median in dotted lines?? or any other nice representation???

採用された回答

Wayne King
Wayne King 2013 年 6 月 14 日
Can you please show an example, because the color of the median line defaults to red. So I don't think I understand what you're saying. At any rate, you can modify that line like this:
load carsmall;
boxplot(MPG)
h = findobj(gca,'tag','Median');
set(h,'linestyle','-.');
set(h,'Color',[0 0 0])
  1 件のコメント
Divya
Divya 2013 年 6 月 14 日
As an example,
figure
h = boxplot(abs((t_base)-(t_60min)),'notch','on','sym','k*', 'colors','k');title('Base 60min')
set(h,{'linew'},{2})
Here when the color black is chosen for whole boxplot, then the median is not distinguished. So i enabled notch to 'on'. So that the median is distinguish with sharp edges. But when there is a case the 25th percentile and the median are same, then the median looks like horns. As an example i am attaching the image link below
The example you gave is working. But still when the median and 25th percentile are same, we can not distinguish the median.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeAnnotations についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by