SCATTER PLOT

Overview

scatter

A scatter plot shows the relationship between two quantitative variables measured for the same individuals. The values of one variable appear on the horizontal axis, and the values of the other variables appear on the vertical axis. Each individual in the data appears as a point on the graph.

We have two modes of operation.

In the first mode, which we could call the "successive points" mode, we specify a value in x and a value in y for each message. This leads to an additional point being displayed in the graph, and the points continue to add to the graph up to the user-defined limit quantity, then each new point replaces the oldest and so on. This mode is practical for time series where the data arrives gradually.

The second mode is the XY mode: we specify in x and y two tables of the same dimensions, which explicitly define all the points to be displayed. The first table defines the list of abscissas and the second table defines the list of ordinates.

“Successive stitches” mode

“Successive stitches” mode

If a user configures a series "Series 1", choosing the "prop1" property for the x axis and the "prop2" property for the y axis, then upon receiving the following message:

   msg.payload = {
    "prop1": "abscisse1",
    "prop2": 4
  }
return msg;

a point is displayed on the graph, at the abscissa "abscissa1" and at the ordinate 4.

If a new message is received:

msg.payload = {
    "prop1": "abscisse2",
    "prop2": 4
}
return msg;

a second point is displayed, at the abscissa “abscissa2” and at the ordinate 4.

XY mode

XY mode

If a user configures a series "Series 1", choosing for the x axis the table "tab1" and for the y axis the table "tab2", then when receiving the following message:

  msg.payload = {
    "tab1": ["abscisse1", "abscisse2"],
    "tab2": [4, 4]
  }
return msg;

two points are displayed on the graph, at abscissa "abscissa1" and "abscissa2", and both at ordinate 4. When new tables for x and y are received, the received data replaces the existing graph. The point limit has no meaning here and should be ignored.

Was this article helpful?

Powered by Zendesk