O'Reilly logo

Mastering Internet of Things by Peter Waher

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Displaying the plot

We can now run the application and navigate to the /History.md resource. It might look something like the following image. If you look at the script, you will notice that the expression that returns the plot (the last statement in the function) is a sum of three separate graphs. First, an area chart shows how much average motion has occurred during the period. A polygon then paints an area, where the upper border represents the largest light values, and the lower the smallest light values during each period. The red line corresponds to the average light value during each period.

Adding graphs is done using the addition operator:

Plot of historical data

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required