plotGraph: Plot and Stats Computation for IFC Graph

View source: R/plotGraph.R

plotGraphR Documentation

Plot and Stats Computation for IFC Graph

Description

Computes plot and stats from a IFC graph

Usage

plotGraph(
  obj,
  graph,
  draw = FALSE,
  stats_print = draw,
  color_mode = c("white", "black")[1],
  add_key = "panel",
  precision = c("light", "full")[1],
  trunc_labels = 38,
  trans = "asinh",
  bin,
  viewport = "ideas",
  backend = "lattice",
  ...
)

Arguments

obj

an 'IFC_data' object extracted with features extracted.

graph

a graph from 'obj' or a list that can be coerced by buildGraph.

draw

whether to draw plot or not. Default is FALSE.

stats_print

whether to print stats or not. Default is given by 'draw' argument.

color_mode

whether to extract colors from 'obj' in white or black mode. Default is "white".

add_key

whether to draw a "global" key under title or in the first "panel" or "both". Default is "panel".
Accepted values are either: FALSE, "panel", "global", "both" or c("panel", "global").
Note that it only applies when display is seen as overlaying populations.

precision

when graphs is a 2D scatter with population overlay, this argument controls amount of information displayed. Default is "light".
-"light", the default, will only display points of same coordinates that are among the other layers.
-"full" will display all the layers.

trunc_labels

maximum number of characters to display for labels. Default is 38.

trans

the name of a transformation function for density graphs. If missing the default, the BasePop[[1]]$densitytrans, if any, will be retrieved, otherwise "asinh" will be used.

bin

number of bin used for histogram / density. Default is missing.

viewport

either "ideas", "data" or "max" defining limits used for the graph. Default is "ideas".
-"ideas" will use same limits as the one defined in ideas.
-"data" will use data to define limits.
-"max" will use data and regions drawn to define limits.

backend

backend used for drawing. Allowed are "lattice", "base", "raster", "raster-edge", "raster-hybrid". Default is "lattice".
-"lattice" is the original one used in IFC using lattice,
-"base" will produce the plot using base,
-"raster" uses "base" for plotting but 2D graphs points will be produced as rasterImage.
This has the main advantage of being super fast allowing for plotting a huge amount of points while generating smaller objects (in bytes). However, plot quality is impacted with "raster" method and resizing can lead to unpleasant looking. -"raster-edge" is the same as "raster" except that points outside of limits will be drawn onto the edge.
-"raster-hybrid" uses "raster" for drawing on top of a first "raster-edge" pass to produce an hybrid display.

...

other arguments to be passed.

Value

it invisibly returns a list whose members are:
-stats, a table of statistics computed for the graph, if 'stats_print' was TRUE,
-input, a list with input parameters.


IFC documentation built on Sept. 14, 2023, 1:08 a.m.