S3 methods to plot object with original classes in qntmap package. See graphics::plot() for general use of plot. Mapping data (qm_xmap and qm_qntmap classes) are visualized by heat maps.

# S3 method for qntmap
plot(
  x,
  y = setdiff(names(x), c("x", "y"))[1L],
  zname = y,
  zlim = NULL,
  colors = c("magma", "viridis", "gray"),
  interactive = TRUE,
  unit = c("px", "um", "mm", "cm"),
  ...
)

# S3 method for qm_xmap
plot(
  x,
  y = setdiff(names(x), c("x", "y"))[1L],
  zname = y,
  zlim = NULL,
  colors = c("magma", "viridis", "gray"),
  interactive = TRUE,
  unit = c("px", "um", "mm", "cm"),
  ...
)

# S3 method for qm_cluster
plot(
  x,
  y = "cluster",
  zname = y,
  zlim = NULL,
  colors = c("magma", "viridis", "gray"),
  interactive = TRUE,
  unit = c("px", "um", "mm", "cm"),
  ...
)

Arguments

x

An object of class qntmap, qm_cluster, or qm_xmap, returned by quantify(), qntmap(), and read_xmap(), respectively.

zname, y

A string specifying a component of x to determine colors to fill the map. y is the alias of zname.

zlim

A range of z.

colors

A color scale "viridis" (default) or "gray" applicable when fill is continuous.

interactive

TRUE (default) produces plots with shiny WebUI, and FALSE produces plots with ggplot2::ggplot().

unit

Unit of x- and y-axis ("px", "um", "nm" or "cm").

...

Arguments passed to internal functions.

See also

Examples

# qm_raster class object d <- data.frame(expand.grid(x = 1:5, y = 1:5), fill = runif(5)) class(d) <- c("qm_raster", class(d)) plot(d, "fill", interactive = FALSE)
#> Warning: "interactive" is not a graphical parameter
#> Warning: "interactive" is not a graphical parameter
#> Warning: "interactive" is not a graphical parameter
#> Warning: "interactive" is not a graphical parameter
#> Warning: "interactive" is not a graphical parameter
#> Warning: "interactive" is not a graphical parameter
#> Warning: "interactive" is not a graphical parameter
#> Warning: "interactive" is not a graphical parameter
#> Warning: "interactive" is not a graphical parameter
#> Warning: "interactive" is not a graphical parameter
#> Warning: "interactive" is not a graphical parameter
#> Warning: "interactive" is not a graphical parameter
#> Warning: "interactive" is not a graphical parameter
#> Warning: "interactive" is not a graphical parameter
#> Warning: "interactive" is not a graphical parameter
#> Warning: "interactive" is not a graphical parameter
#> Warning: "interactive" is not a graphical parameter
#> Warning: "interactive" is not a graphical parameter
#> Warning: "interactive" is not a graphical parameter
#> Warning: "interactive" is not a graphical parameter
#> Warning: "interactive" is not a graphical parameter
#> Warning: "interactive" is not a graphical parameter
#> Warning: "interactive" is not a graphical parameter
#> Warning: "interactive" is not a graphical parameter
#> Warning: "interactive" is not a graphical parameter
#> Warning: "interactive" is not a graphical parameter
#> Warning: "interactive" is not a graphical parameter
#> Warning: "interactive" is not a graphical parameter
#> Warning: "interactive" is not a graphical parameter
#> Warning: "interactive" is not a graphical parameter
#> Warning: "interactive" is not a graphical parameter
#> Warning: "interactive" is not a graphical parameter
#> Warning: "interactive" is not a graphical parameter
#> Warning: "interactive" is not a graphical parameter
#> Warning: "interactive" is not a graphical parameter
#> Warning: "interactive" is not a graphical parameter
#> Warning: "interactive" is not a graphical parameter
#> Warning: "interactive" is not a graphical parameter
#> Warning: "interactive" is not a graphical parameter