All Collections
IoT Projects Tutorials
Using Scatter Plots and Derived Variables to Compute and Display Complex Math Functions
Using Scatter Plots and Derived Variables to Compute and Display Complex Math Functions

Use scatter plots and derived variables to additional math functions and data visualization.

Agustin Pelaez avatar
Written by Agustin Pelaez
Updated over a week ago

A useful Ubidots widget is the "Scatter Plot". It allows you to plot two variables against each other, even if they arrive with different time-stamps. Depending on you application, it can be quite handy to analyze things like:

  • Temperature vs. Humidity

  • Pressure vs Temperature

  • AC Energy Consumption vs Ambient Temperature

  • RPM vs Torque

  • Signal Strength vs Relative Position

On the other hand, another useful feature is the "Derived Variable" which uses an internal math engine to compute user-defined math expressions using your sensor data (even if the Ubidots variables have irregular time-stamps). This is quite powerful in situations where you want to save processing power in your device and perform the calculations on the cloud, or if you detect a sensor is not calibrated and you just want to add an offset. Currently, we support these operations:

  • Basic ("+", "-", "/", "*")

  • Exponential ("^")

  • Logarithmic ("log(x)")

  • Trigonometric ("sin(x)", "cos(x)", "tan(x)")

In an attempt to prove the real-time capabilities of these features, check out our hackster for more in creating a simple Python script to upload an incremental time series to Ubidots and then create several derived variables from it, using trigonometric functions. With the results of your variable uploads with python, these variables are plotted, getting these beautiful figures (a.k.a "Lissajous Figures"):

Did this answer your question?