plot_summary_raster_byCell: plot_summary_raster_byCell

plot_summary_raster_byCellR Documentation

plot_summary_raster_byCell

Description

plot_summary_raster_byCell

Usage

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

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.

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()

xrng

view domain in x dimension.

yrng

view domain in y dimension.

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, facet_by = "tall_var")
img_res = prep_images(summary_dt, 4, facet_by = "tall_var")
#zoom on top-right quadrant
summary_dt.zoom = prep_summary(profile_dt, tsne_dt, 4, facet_by = "tall_var",
    xrng = c(0, .5), yrng = c(0, .5))
img_res.zoom = prep_images(summary_dt.zoom, 4, facet_by = "tall_var",
    xrng = c(0, .5), yrng = c(0, .5))
plot_summary_raster_byCell(img_res$image_dt,
              x_points = img_res$x_points)
plot_summary_raster_byCell(img_res.zoom$image_dt,
              x_points = img_res.zoom$x_points,
              xrng = img_res.zoom$xrng,
              yrng = img_res.zoom$yrng)

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