error bar plot using double y axis

14 ビュー (過去 30 日間)
AUWAL ABUBAKAR
AUWAL ABUBAKAR 2021 年 8 月 17 日
編集済み: dpb 2021 年 8 月 18 日
Dear MATLAB users,
I am trying to use errorbar plot the following data
datapoints=[500, 200, 300, 480, 550];
error=[2, 1.5, 0.5, 3, 1.1];
errorbar(1:5,datapoints, error,'ro');
does not show the error bar lenght due to the values being too small.
Is there a way I can plot the error bar lenght on the right y-axis and use small scale so the the lenght can be appreciated
thanks

採用された回答

dpb
dpb 2021 年 8 月 17 日
編集済み: dpb 2021 年 8 月 18 日
You could, sure, but to make things line up, you'd have to do something like scale the RH axes by 100 for those points to line up with the locations of the real data and that would really be a distortion.
It would seem that the feature of the data to be appreciated is that the errors are small; I think the more appropriate way to plot on a second axis if you really do want to scale up the errors would be to use the tiled layout or stackedplot to put the errors on the second axis but below the other and not try to place on top of the same points.
  1 件のコメント
AUWAL ABUBAKAR
AUWAL ABUBAKAR 2021 年 8 月 18 日
Thanks for your help. I am considering tiledlayout

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

その他の回答 (0 件)

カテゴリ

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

製品


リリース

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by