making `errorbar` work with `datetime`
이전 댓글 표시
I would like to plot errorbar with datetime on x-axis
x = datetime(['21-Aug-2019'; '22-Aug-2019'; '23-Aug-2019']);
y = [100; 110; 130];
figure
plot(x,y, '.')
hold on
errorbar(x, y, 20)
The final error produces this error
Error using errorbar (line 76)
Input arguments must be numeric or objects which can be converted to double.
Even the following produces error
errorbar(datenum(x), y, 20*ones(size(y)))
I am using R2016b
채택된 답변
추가 답변 (1개)
Lei Hou
2019년 8월 27일
4 개 추천
Sai is correct that errorbar doesn't yet support datetimes. I've made an enhancement request, and hopefully errorbar will be updated in a not-too-distant upcoming release.
카테고리
도움말 센터 및 File Exchange에서 Errorbars에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!