Weeksdays on x-axis for multiple plots | MATLAB IoT Analytics | Forum

The ThingSpeak community site has been upgraded to a new site. This site is currently in read-only mode. You can ask questions or post and read discussions on the new site.

Please consider registering

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —

— Match —

— Forum Options —

Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_Feed sp_TopicIcon
Weeksdays on x-axis for multiple plots
No permission to create posts
May 5, 2019
5:01 am

Forum Posts: 19
Member Since:
March 13, 2019
sp_UserOfflineSmall Offline

As I'm moving on using MATLAB's feature, there's another challenge occurring:

I'd like to display the days of the week on the x-axis. So far so simple, e.g. plot(data.Timestamps, data.TemperatureWeek1)
But I'd like to do that for data of lets say the last four weeks.

The data should not be displayed one after the other nor stacked one on top of the other but displayed in the 'some plot'.
Weekdays are identical regardless of which week the data is from. And distinguishing between the weeks could be easily done by its color and the legend.

How could I do that?
Thanks a lot

May 7, 2019
1:01 pm

Forum Posts: 885
Member Since:
March 7, 2017
sp_UserOfflineSmall Offline

I think you will want to split your data series into multiple series for each week.
MATLAB allos you to search for a value and create a new variable with the values that match a condition.

for example, if
will provide all the values greater than 10 and store them in the variable bigValues.
You should be able to use this to sort your time values as well.

You can see an example of how to plot multiple series here.

Forum Timezone: America/New_York

Most Users Ever Online: 166

Currently Online:
27 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

rw950431: 272

Vinod: 240

piajola: 95

turgo: 70

vespapierre: 63

Adarsh_Murthy: 62

Member Stats:

Guest Posters: 1

Members: 8665

Moderators: 1

Admins: 2

Forum Stats:

Groups: 3

Forums: 14

Topics: 1600

Posts: 5760

Newest Members:

Advantagetreeexperts, laundrydaddyuk, techhhelp5, ken, tran, huldacormier

Moderators: cstapels: 460

Administrators: Hans: 405, lee: 457