Skip to content

Commit 6920770

Browse files
committed
more docs
1 parent 271be73 commit 6920770

4 files changed

Lines changed: 20 additions & 16 deletions

File tree

R/plot-image.R

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
#' @param x \code{\link{SpatialData}} object.
55
#' @param i scalar integer or string;
66
#' specifies which \code{images} to plot.
7-
#' @param k resolution; if NULL (default), picking
8-
#' best for given \code{w}idth and \code{h}eight.
97
#' @param c character vector of colors to use;
10-
#' if NULL (default), using \code{rainbow()}.
8+
#' if NULL (default), using RGB.
119
#' @param ch integer or character vector
1210
#' specifying which channels to render.
1311
#' @param cl list of channel-wise contrast limits.
12+
#' @param k resolution; if NULL (default), picking
13+
#' best for given \code{w}idth and \code{h}eight.
1414
#' @param w,h render width and height in pixel.
1515
#'
1616
#' @return \code{ggplot}
@@ -30,7 +30,7 @@
3030
#' @importFrom grDevices rgb
3131
#' @importFrom DelayedArray realize
3232
#' @export
33-
sd_plot_image <- \(x, i=1, k=NULL, c=NULL, ch=NULL, cl=NULL, w=800, h=800) {
33+
sd_plot_image <- \(x, i=1, c=NULL, ch=NULL, cl=NULL, k=NULL, w=800, h=800) {
3434
#x <- sd; i <- 1; w=h=800; ch <- cl <- c <- k <- NULL; ch <- 2
3535
ia <- x@images[[i]]
3636
ch <- .ch_idx(ia, ch)

R/plot-label.R

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
#' @param x \code{\link{SpatialData}} object.
55
#' @param i scalar integer or string;
66
#' specifies which \code{labels} to plot.
7-
#' @param k resolution; if NULL (default), picking
8-
#' best for given \code{w}idth and \code{h}eight.
97
#' @param c character vector of colors to use;
108
#' if NULL (default), using \code{rainbow()}.
9+
#' @param k resolution; if NULL (default), picking
10+
#' best for given \code{w}idth and \code{h}eight.
1111
#' @param w,h render width and height in pixel.
1212
#'
1313
#' @return \code{ggplot}
@@ -18,12 +18,14 @@
1818
#' sd <- readSpatialData(pa)
1919
#'
2020
#' sd_plot() + sd_plot_label(sd)
21+
#' sd_plot() + sd_plot_label(sd, c="pink")
22+
#' sd_plot() + sd_plot_label(sd, c=c("lavender", "blue"))
2123
#'
2224
#' @importFrom methods as
2325
#' @importFrom DelayedArray realize
2426
#' @importFrom grDevices rgb rainbow colorRampPalette
2527
#' @export
26-
sd_plot_label <- \(x, i=1, k=NULL, c=NULL, w=800, h=800) {
28+
sd_plot_label <- \(x, i=1, c=NULL, k=NULL, w=800, h=800) {
2729
la <- x@labels[[i]]
2830
if (is.null(k))
2931
k <- .guess_scale(la, w, h)

man/sd_plot_image.Rd

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/sd_plot_label.Rd

Lines changed: 6 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)