Thingspeak: problem with a bar graph

19 views (last 30 days)
Fabrice Auzanneau
Fabrice Auzanneau on 21 Mar 2020
Hi
I'm trying to plot some measured values on bar graphs, but it seems that only a few values are plotted, not all of them.
Here is the code:
readChannelID = ***;
fieldID = 1;
readAPIkey = '****';
%% Read data %%
month = 3;
day = 21;
range = [datetime(2020,month,day,0,0,0),datetime(2020,month,day,23,59,59)];
[data,time] = thingSpeakRead(readChannelID,'Fields',1,'DateRange',range,'ReadKey', readAPIkey);
%% Vizualize data
hours = datetime(0,0,0,hour(time)+1,minute(time),second(time));
hours
data
bar (hours,data,'r');
The graph is plotted but the maximum plotted value is around 25, and the maximum value I get when displaying the value lists is 58.
The last values displayed for data are:
5
5
5
6
5
20
13
15
13
48
27
26
58
19
6
12
It seems only one value out of 5 is plotted. What did I miss?
Thanks for your help

Answers (0)

Communities

More Answers in the  ThingSpeak Community

Categories

Find more on ThingSpeak in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!