Hi, I have one question. I have set of data column wise. Actually two columns are there. Problem is that 1 column contain very small values in decimals like 0.00001 etc where the other column has comparatively large values. I want to analyze this data through plotting.
Can anybody please suggest me which plot type like bar, scatter or plot is better here??? I would be very thankful to you.

5 件のコメント

Stephan
Stephan 2018 年 9 月 26 日
編集済み: Stephan 2018 年 9 月 26 日
Maybe a plot with 2 y axis is helpful - you could check yyaxis in the documentation
Ahmad Bilal
Ahmad Bilal 2018 年 9 月 26 日
can you help me with syntax
Stephan
Stephan 2018 年 9 月 26 日
Ahmad Bilal
Ahmad Bilal 2018 年 9 月 26 日
It works fine now. but bars are overlapping each other as it is shown in picture. I want to ask how can i make it that these two bars not overlap each other. Thanks
dpb
dpb 2018 年 9 月 26 日
Yeah, for bar that's pit(proverbial)a(ppendage) that yyaxis isn't clever enough to recognize the overlap.
See ADDENDUM to Answer for the workaround...

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

 採用された回答

dpb
dpb 2018 年 9 月 26 日
編集済み: dpb 2018 年 9 月 26 日

0 投票

Look at
doc yyaxis
to put the two on separate axes that will cover range of each variable independently for starters, at least....
ADDENDUM POST PLAINTIVE COMMENT ABOVE :)
If y is the data array, then
yyaxis left
bar([y(:,1) nan(size(y,1),1)],'grouped')
yyaxis right
bar([ nan(size(y,1),1) y(:,2)],'grouped')
This uses feature of most basic plotting routines in ML that NaN data are silently ignored; so you draw a 'grouped' bar plot on LH axes with the first column of data but NaN as placeholder for second and vice versa on RH axes.
Should be a higher-level way to tell yyaxis/bar together this is what you're trying to achieve without having to do it directly oneself, but "it is what it is" at present.

その他の回答 (0 件)

カテゴリ

タグ

質問済み:

2018 年 9 月 26 日

編集済み:

dpb
2018 年 9 月 26 日

Community Treasure Hunt

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

Start Hunting!

Translated by