Helper to build a list to allow graph export.
buildGraph(
type = c("histogram", "scatter", "density")[3],
xlocation = 0,
ylocation = 0,
f1 = "Object Number",
f2 = "Object Number",
scaletype = 1,
xmin = -1,
xmax = 1,
ymin = 0,
ymax = 1,
title = paste0(unlist(lapply(BasePop, FUN = function(x) x$name)), collapse = ", "),
xlabel = f1,
ylabel = f2,
axislabelsfontsize = 10,
axistickmarklabelsfontsize = 10,
graphtitlefontsize = 12,
regionlabelsfontsize = 10,
bincount = 0,
freq = c("T", "F")[1],
histogramsmoothingfactor = 0,
xlogrange = "P",
ylogrange = "P",
splitterdistance = 120,
stats = c("true", "false")[2],
xsize = c(320, 480, 640)[1],
ysize = xsize + ifelse(stats == "true", splitterdistance, 0),
xstats = "Count|%Gated|Mean",
ystats = xstats,
order,
xstatsorder,
Legend,
BasePop = list(list()),
GraphRegion = list(list()),
ShownPop = list(list()),
...
)
Graph's type. Either "histogram", "scatter" or "density". Default is "density".
Integer. Graph's x location. Default is 0.
Integer. Graph's x location. Default is 0.
Character. Graph x axis parameter. Default is "Object Number".
Character. Graph y axis parameter. Default is "Object Number". Only used when 'type' is not "histogram".
Integer. Graph scale. Either 0 (auto), 1 (manual). Default is 1.
Double. Graph's xmin. Default -1.
Double. Graph's xmax. Default 1.
Double. Graph's xmin. Default 0.
Double. Graph's xmax. Default 1.
Character. Graph title label. Default will use names of BasePop collapse with ', '.
Character. Graph x axis label.
Character. Graph y axis label.
Integer. Axis label font size. Default is 10. Allowed are: 8, 9, 10, 11, 12, 14, 16, 18, 20, 22, 24, 26, 28. Checked but not yet implemented.
Integer. Axis tick font size. Default is 10. Allowed are: 8, 9, 10, 11, 12, 14, 16, 18, 20, 22, 24, 26, 28. Checked but not yet implemented.
Integer. Axis title font size. Default is 12. Allowed are: 8, 9, 10, 11, 12, 14, 16, 18, 20, 22, 24, 26, 28. Checked but not yet implemented.
Integer. Axis region font size. Default is 10. Allowed are: 8, 9, 10, 11, 12, 14, 16, 18, 20, 22, 24, 26, 28. Checked but not yet implemented.
Integer. Histogram bin count. Default is 0. Allowed are: 0, 8, 16, 32, 64, 128, 256, 512, 1024.
Character. Histogram with frequency normalization of not. Default is "T", allowed are "T" or "F".
Integer. Histogram smoothing factor. Allowed are [0-20]. Only partly implemented, default is 0 for no smoothing other values will produce same smoothing.
determines hyper parameter of smoothLinLog transformation for x-axis. Default is "P" for no transformation.
determines hyper parameter of smoothLinLog transformation for y-axis. Default is "P" for no transformation.
Integer. Default is 120. Checked but not yet implemented.
Character. Either "true" or "false" to display stats. Default is "false".
Integer. Graph's x size. Default is 320 for small. Regular are: 320 (small), 480 (medium), 640 (big). Checked but not yet implemented.
Integer. Graph's y size. Default is 'ysize' + 'splitterdistance' when 'stats' is set to "true". Checked but not yet implemented.
Character. x stats to be computed. Default is 'Count|%Gated|Mean'. It has to be a filled with the concatenation of 'Count', '%Total', '%Gated', '%Plotted', 'Objects/mL', 'Mean', 'Median', 'Std. Dev.', 'MAD', 'CV', 'Minimum', 'Maximum', 'Geo. Mean', 'Mode', 'Variance' and /or 'NaN', collapse with '|'. Checked but not yet implemented.
Character. y stats to be computed. Should be identical to 'xstats'. Default is xstats. Checked but not yet implemented.
Character. Order to display populations. When 'type' is "density" it will be BasePop[[1]]$name. When 'type' is "histogram" or "density" 'ShownPop' are not allowed Otherwise, it will use each of 'GraphRegion', 'BasePop' and 'ShownPop' names, collapse with '|'.
Character. Order of stat rows. It will use each of 'GraphRegion' names & each of 'BasePop' names, reverted and collapse with '|'.
Default is list(list(onoff='false',x='0',y='0',witdh='96',height='128')). Not yet implemented.
Default is list(list()). See details.
Default is list(list()). Only allowed member are sub-list(s) with only one character component named 'name'.
Default is list(list()). Only allowed member are sub-list(s) with only one character component named 'name'.
Other arguments to be passed.
a list containing all graph information.
Many parameters are not used or are only partly implemented, but most are checked in order to be compatible for further export. For 'BasePop', if left as is "All" will be used as default. This parameter will be built / checked according to 'type' argument. 'BasePop' has to be a list of list(s) and each sub-list should can contain several elements, but only "name" is mandatory. The sublist mebers ar: -"name", "linestyle", "fill", and only when 'type' is "density" -"densitybincount", "densitymin", "densitymax", -"densitycolors", "densitycolorslightmode", "densitycolorsdarkmode". Each sub-list will be created automatically with the following default values (except if explicitly provided): -linestyle='Solid', -fill='true', -densitybincount='128',densitymin='0',densitymax='0', -densitycolors='-16776961|-13447886|-256|-23296|-65536|', -densitycolorslightmode='-16776961|-13447886|-256|-23296|-65536|', -densitycolorsdarkmode='-16776961|-13447886|-256|-23296|-65536|' Note that when 'type' is "density", 'BasePop' should be of length one. and fill will be overwritten to 'true'.