ThingSpeak

ThingSpeak

Public Channel

Spacerlabs Team in Discussions
Last activity on 25 Jul 2022

Hi, The template code provided for the visualisation of a '2D line plot with y axis on both left & right side' does not work with my public channel 1789024 and Field 1 and Field 2 data. The axes are drawn and automatically adjust to the number of points which are chosen and the range of data values. But no points are actually plotted ( visible ). I have a free license and two channels in total. Are there license restrictions or can anyone see why the code doesn't work ? regards, SpacerLabs 2D line plot with two y-axes not working Your data has many NAN values. Line will connect subsequent real values points with a line, but since yo do not have real valued points that are sequential, they cannot be connected. Use scatter in place of plot. yyaxis left; scatter(time1, data1) yyaxis right; scatter(time2, data2); You can also remove the NaN values: data1nn=data1(~isnan(data1)); time1nn=time1(~isnan(data1)); data2nn=data2(~isnan(data2)); time2nn=time2(~isnan(data2)); plot(time1nn,data1nn); plot(time2nn,data2nn); 2d line plot

About ThingSpeak

The community for students, researchers, and engineers looking to use MATLAB, Simulink, and ThingSpeak for Internet of Things applications. You can find the latest ThingSpeak news, tutorials to jump-start your next IoT project, and a forum to engage in a discussion on your latest cloud-based project. You can see answers to problems other users have solved and share how you solved a problem.