フィルターのクリア

remove lines in between bar

3 ビュー (過去 30 日間)
Sylvia
Sylvia 2015 年 11 月 13 日
コメント済み: Mohammad Abouali 2015 年 11 月 13 日
I would like to plot several bar plots at the same time but only their traces because this is easier to see.
<<
>>
So what I have is above and the code is as follows:
figure(1)
hold on
[n,x] = hist(tds(tds<500),50); bh = bar(x,n./sum(n),'BarWidth',1);
[n2,x2] = hist(vips,50); bh2 = bar(x2,n2./sum(n2),'BarWidth',1);
[n3,x3] = hist(fssp(fssp<500),50); bh3 = bar(x3,n3./sum(n3),'BarWidth',1);
[n4,x4] = hist(ni08,50); bh4 = bar(x4,n4./sum(n4),'BarWidth',1);
set(bh,'FaceColor','none','EdgeColor',[0 0 0.7],'LineWidth',1.2);
set(bh2,'FaceColor','none','EdgeColor',[0 0.7 0],'LineWidth',1.2);
set(bh3,'FaceColor','none','EdgeColor',[0.7 0 0],'LineWidth',1.2);
set(bh4,'FaceColor','none','EdgeColor',[0 0 0],'LineWidth',1.2);
set(gca,'YScale','log'); xlim([0 500]);
clear n x bh n2 x2 bh2 n3 x3 bh3
But what I want is something like this:
Any suggestions? Thanks for your help. - Sylvia

採用された回答

Mohammad Abouali
Mohammad Abouali 2015 年 11 月 13 日
Use stairs() command instead of bar to plot them
  2 件のコメント
Sylvia
Sylvia 2015 年 11 月 13 日
Thanks, Mohammad.
Mohammad Abouali
Mohammad Abouali 2015 年 11 月 13 日
You are welcome.

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

その他の回答 (0 件)

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by