23 lines
786 B
Plaintext
23 lines
786 B
Plaintext
command sparklines listOfNums
|
|
local utfbase=0x2581
|
|
local tStats, utfp, tmin,tmax,trange
|
|
put listOfNums into tStats
|
|
replace ", " with space in tStats
|
|
replace space with comma in tStats
|
|
put min(tStats) into tmin
|
|
put max(tStats) into tmax
|
|
put tmax - tmin into trange
|
|
put "Min:" && tmin && tab into plot
|
|
put "Max:" && tmax && tab after plot
|
|
put "Range:" && trange && tab after plot
|
|
put "Mean" && average(tStats) && tab after plot
|
|
put "Stdev:" && standardDeviation(tStats) && tab after plot
|
|
put "Variance:" && variance(tStats) && return after plot
|
|
|
|
repeat for each item i in tStats
|
|
put (round(i - tmin/trange * 7)) + utfbase into utfp
|
|
put numToCodepoint(utfp) after plot
|
|
end repeat
|
|
put plot
|
|
end sparklines
|