Skip to content

Commit 1ac6362

Browse files
committed
fix plotLabel example
1 parent 815575b commit 1ac6362

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

NAMESPACE

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ importFrom(DelayedArray,path)
1313
importFrom(DelayedArray,realize)
1414
importFrom(Rarr,zarr_overview)
1515
importFrom(S4Vectors,metadata)
16+
importFrom(SingleCellExperiment,colData)
1617
importFrom(SingleCellExperiment,int_colData)
1718
importFrom(SingleCellExperiment,int_metadata)
1819
importFrom(SpatialData,channels)

R/plotLabel.R

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@
3838
#' # TODO: did a small fix to color scheme below, will fix example later
3939
#' # pal <- hcl.colors(n, "Spectral")
4040
#' pal_d <- hcl.colors(10, "Spectral")
41-
#' p + plotLabel(x, i, "id", pal=pal_d)
41+
#' p + plotLabel(x, i, c = "id", pal=pal_d)
4242
#'
4343
#' # coloring by 'assay' data
44-
#' p + plotLabel(x, i, "channel_1_sum")
44+
#' p + plotLabel(x, i, c = "channel_1_sum")
4545
NULL
4646

4747
#' @rdname plotLabel
@@ -52,6 +52,7 @@ NULL
5252
#' @importFrom ggplot2
5353
#' scale_fill_manual scale_fill_gradientn
5454
#' aes geom_raster theme unit guides guide_legend
55+
#' @importFrom SingleCellExperiment colData
5556
#' @export
5657
setMethod("plotLabel", "SpatialData", \(x, i=1, j=1, k=NULL, c=NULL,
5758
a=0.5, pal=c("red", "green"), nan=NA, assay=1) {

man/plotLabel.Rd

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

tests/testthat/Rplots.pdf

4.17 KB
Binary file not shown.

0 commit comments

Comments
 (0)