error bars plotting only on one side of the data points on a semi log plot

16 ビュー (過去 30 日間)
charles aouad
charles aouad 2019 年 8 月 6 日
編集済み: dpb 2019 年 8 月 8 日
Hello everyone!
i am plotting error bars in a semi log plot (code attached)
for some strange reason matlab is plotting the error bars only from one side for some of the data points , and from two sides for others.(figure attached in the pdf file)
did someone ever encounter such a problem? i know that the error bars will not be symetrical with reference to the data point because of the log scale on the y axis, but they should not completely disappear from one of the sides! (the data series i am talking about are the small diamonds)
error bars only from one side.jpg
scatter(Galactocentricradius,asqbsqnorm,...
'DisplayName','2A^2+5B^2 normalized',...
'MarkerEdgeColor',[0 0 0],...
'Marker','diamond');
hold on;
scatter(Galactocentricradius,SFRNORMALIZED,...
'DisplayName','\Sigma{sfr}/\Sigma sfr_{total}',...
'MarkerEdgeColor',[0 0 0],...
'Marker','hexagram','SizeData',50,'MarkerFaceColor',[0.501960784313725 0.501960784313725 0.501960784313725]);
errorbar(Galactocentricradius,asqbsqnorm,errorbar2a25b2norm,'handlevisibility','off','Color',[0.15 0.15 0.15],'capsize',1);
errorbar(Galactocentricradius,SFRNORMALIZED,erroronSFRnormalized,'handlevisibility','off','Color',[0.15 0.15 0.15],'capsize',1);
set(gca,'Yscale','log');
ylim([0.0001,1]);

採用された回答

dpb
dpb 2019 年 8 月 6 日
Check and you'll find the lower limit for those not plotted is <0 which can't be represented on log axis.
  9 件のコメント
dpb
dpb 2019 年 8 月 8 日
編集済み: dpb 2019 年 8 月 8 日
You can compute it however you wish, the preceding of a small but positive lower limit shows up on your graph by going off the bottom unended which at least shows that it's large in that direction. The 90% value may or may not have such properties. But, it's your call: I'll just note the previous caveats.
The error is I didn't cut 'n paste but typed into the edit window and left off the (isneg) addressing array on the RHS. I fixed the above code snippet.
charles aouad
charles aouad 2019 年 8 月 8 日
THANK YOU SOO MUCH!!you were extremely helpfull.MANY THANKS

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

その他の回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by