plot_summary_raster: plot_summary_raster

plot_summary_rasterR Documentation

plot_summary_raster

Description

plot_summary_raster

Usage

plot_summary_raster(
  image_dt,
  x_points,
  y_points = x_points,
  xrng = c(-0.5, 0.5),
  yrng = c(-0.5, 0.5),
  p = NULL,
  line_color_mapping = NULL,
  N_floor = 0,
  N_ceiling = NULL,
  min_size = 0.3,
  return_data = FALSE,
  wide_var = "name"
)

Arguments

image_dt

$image_dt of result from prep_images()

x_points

numeric. number of grid points to use in x dimension.

y_points

numeric. number of grid points to use in y dimension.

xrng

view domain in x dimension.

yrng

view domain in y dimension.

p

an existing ggplot to overlay images onto. Default of NULL starts a new plot.

line_color_mapping

named character vector for scale_color_manual, recommend $line_color_mapping from prep_images()

N_floor

The value of N to consider 0. bins with N values <= N_floor will be ignored.

N_ceiling

The value of N to consider 1. bins with N values >= N_ceiling will have images drawn at full size.

min_size

Numeric (0, 1]. The minimum size images to draw. The default of .3 draws images for all bins with N values >= 30 N_floor to N_ceiling.

return_data

if TRUE, data.table that would have been used to create ggplot is returned instead.

Value

ggplot containing images summarizing t-sne regions. if return_data is TRUE, instead the data.table containing plot info is returned.

Examples

data("profile_dt")
data("tsne_dt")
summary_dt = prep_summary(profile_dt, tsne_dt, 4)
img_res = prep_images(summary_dt, 4)
#zoom on top-right quadrant

summary_dt.zoom = prep_summary(profile_dt, tsne_dt, 8, xrng = c(0, .5), yrng = c(0, .5))
img_res.zoom = prep_images(summary_dt.zoom, 8, xrng = c(0, .5), yrng = c(0, .5))
plot_summary_raster(img_res$image_dt,
              x_points = img_res$x_points)
plot_summary_raster(img_res.zoom$image_dt,
              x_points = img_res.zoom$x_points,
              xrng = img_res.zoom$xrng,
              yrng = img_res.zoom$yrng, min_size = 0)

jrboyd/seqtsne documentation built on Nov. 5, 2022, 6:37 a.m.