// ploticus script file; run on the command line like this: // pl -cm -eps report.plo //____________________ #call $setdatefmt( "dd.mm.yyyy" ) #set ShowFromDate = "07.11.2005" // <--------- change start date here #set FileName_Meals = "DiabGo-Diary.Meals.csv" // <--------- change file names here #set FileName_Injections = "DiabGo-Diary.Injections.csv" #set FileName_Samples = "DiabGo-Diary.Samples.csv" #set BolusInsulin = "NovoRapid" // <--------- change insulin names here #set BasalInsulin = "Lantus" #set StartDate = $strcat(@ShowFromDate, "-00:00") #set EndDate = $dateadd(@ShowFromDate, 7) #set EndDate = $strcat(@EndDate, "-00:00) #set Title = $substring(@StartDate, 1, 10) #set temp = $substring(@EndDate, 1, 10) #set Title = $strcat("Week from ", @Title) #set Title = $strcat(@Title, " to ") #set Title = $strcat(@Title, @temp) //____________________ #proc settings dtsep: - // background-grid____________________________________ #proc areadef rectangle: 1 1 25 8 title: @Title titledetails: style=B size=10 xscaletype: datetime dd.mm.yyyy-hh:mm xrange: @StartDate @EndDate yrange: 0 300 yaxis.label: BG / mg/dl #proc rect rectangle: min 80(s) max 140(s) color: xrgb(ebffdd) #proc xaxis ticincrement 2 hour grid: color=gray(0.9) width=1 #proc xaxis stubs: inc 1 day stubformat: Www stubslide 1 minorticinc: 2 hour minortics: yes grid: yes #proc yaxis ticincrement 10 grid: color=gray(0.9) width=1 gridskip: minmax #proc yaxis stubs: inc 50 minorticinc 10 minortics yes // Meals (background)_______________________________ #proc areadef rectangle 1 1 25 8 xscaletype: datetime dd.mm.yyyy-hh:mm xrange: @StartDate @EndDate yrange: 0 180 yaxis.label: Carbs / g yaxis.labeldistance: -1.2 yaxis.location: max yaxis.stubs: inc 12 yaxis.minorticinc 6 yaxis.stubdetails: adjust=1,0 color=green yaxis.ticlen: -0.1 #proc getdata file: @FileName_Meals delim: comma commentchar: # filter: ##set t = $deletechars(" ", @@2) ##print @@1, @@t, @@3 #proc bars locfield: 2 lenfield: 3 barwidth: 0.1 color: green outline: no legendlabel: Meals // Injections (foreground)_______________ #proc areadef rectangle: 1 1 25 8 xscaletype: datetime dd.mm.yyyy-hh:mm xrange: @StartDate @EndDate yrange: 0 40 #proc getdata // ____________bolus_________________ file: @FileName_Injections delim: comma commentchar: # filter: ##set t = $deletechars(" ", @@4) ##if @@t = @@BolusInsulin ##set t = $deletechars(" ", @@2) ##print @@1, @@t, @@3 ##endif #proc bars locfield: 2 lenfield: 3 barwidth: 0.05 color: blue outline: no showvalues: yes legendlabel: Insulin injections backbox: skyblue #proc getdata //_______________basal_________________ file: @FileName_Injections delim: comma commentchar: # filter: ##set t = $deletechars(" ", @@4) ##if @@t = @@BasalInsulin ##set t = $deletechars(" ", @@2) ##print @@1, @@t, @@3 ##endif #proc scatterplot xfield: 2 yfield: 3 symbol: shape=diamond style=fill fillcolor=blue linecolor=blue labelfield: 3 labelword: @VAL textdetails: adjust=0.2,0 // Samples (foreground)_______________ #proc areadef rectangle: 1 1 25 8 xscaletype: datetime dd.mm.yyyy-hh:mm xrange: @StartDate @EndDate yrange: 0 300 #proc getdata file: @FileName_Samples delim: comma commentchar: # filter: ##set t = $deletechars(" ", @@2) ##print @@1, @@t, @@3 #proc scatterplot xfield: 2 yfield: 3 symbol: shape=nicecircle style=fill fillcolor=red linecolor=red legendlabel: BG samples // Legend______________________________ #proc legend backcolor: white