Linear and Logarithmic Display

1 Nov

Customizing the Scale Display of Your Nightscout Graph

With the Funnel Cake 0.8.2 release, Nightscout users can now choose between three different views of the website graph: logarithmic (default), linear, and logarithmic (dynamic).

Prior to this release, the Nightscout CGM Remote Monitor (e.g., a Nightscout site) used a logarithmic display. Many devices familiar to users, like the Dexcom receiver and the Dexcom apps, use a linear display.

These terms refer to the scale of the data displayed along axes of the graph. For Nightscout, the scale viewing options change the display and plotting of data along the y axis of the graph (the right-hand side where the blood glucose value range is shown).

On a chart with a linear scale, the tick marks along the graph are equidistant from one another. In a logarithmic display, the tick marks on the scale vary in range. (Mathematically speaking, tick marks on a linear scale represent the previous tick mark multiplied by some number.)

If you want additional information about the differences in linear scale and logarithmic scale, this video from the Khan Academy offers a good overview.

For Nightscout, you may find that the different displays offer different insight when blood glucose values are in different ranges. For example, the logarithmic display offers more information in low ranges. Note: both linear and logarithmic (dynamic) options use a y-axis that scales (dynamically) based on current data. The standard logarithmic display always shows the full range to 400 mg/Dl (22 mmol/L).

Toggling Scale

You can change the scale of your graph by clicking the settings panel icon (hamburger) in the top right of your screen and then choosing between logarithmic, linear, and logarithmic (dynamic). After making your selection, click “save” at the bottom.

toggle-scale

Site Default

The site default for scale is linear. You can change the default in your site settings (Azure or Heroku) by setting the SCALE_Y variable. Possible values: linear, log, and log-dynamic.

scale-setvariable

(Note for Azure users: set this variable in App Settings.)

Scale in Action

The following screenshots show the same blood glucose data from a Nightscout site in all three scale views:

scale-logarithmic

scale-linear

scale-logarithmic-dynamic

The following screenshots show a closer look at the scale change between logarithmic and linear when viewing blood glucose values and changes at lower ranges.

logarithmic-lowerrange

linear-lowerrange

Readme Information

Github readme information regarding the new scale settings is shown below:

scale-readme