glucopy.plot.freq#

glucopy.plot.freq(gf: Gframe, per_day: bool = True, interval: list = [0, 70, 180], count: bool = False, height: float = None, width: float = None)[source]#

Plots a histogram of the frequency of the glucose in the target range

Parameters:
  • gf (Gframe) – Gframe object to plot

  • per_day (bool, default True) – If True, the plot will be separated by days

  • interval (list, default [0,70,180]) – Target range for the glucose

  • count (bool, default False) – If True, the y axis will be the count of the glucose in the target range. If False, the y axis will be the frequency of the glucose in the target range

  • height (float, default None) – Height of the figure

  • width (float, default None) – Width of the figure

Returns:

fig – Figure object

Return type:

plotly.graph_objects.Figure

Examples

Plot the frequency of the glucose per day in the target range [0,70,180] (default), and clicking on the second day on the dropdown menu

In [1]: import glucopy as gp

In [2]: gf = gp.data()

In [3]: gp.plot.freq(gf)
Out[3]: 
Frequency plot per day

Plot the frequency of the glucose for the entire dataset and the target range [0,100,200,300]

In [4]: fig = gp.plot.freq(gf, per_day=False, interval=[0,100,200,300])
Frequency plot