Skip to content

Commit

Permalink
added the lineWidth parameter to the vizCluster function
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaeldossantospeixoto committed May 28, 2024
1 parent 7072829 commit 4cd74bb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
5 changes: 3 additions & 2 deletions R/visualization.R
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#' around. If NULL, it will not create the neighborhood (default: NULL)
#' @param dist numeric; distance to define neighbor cells with respect to each
#' reference cell. If NULL, it will not create the neighborhood (default: NULL)
#' @param lineWidth numeric; width of neighborhood line
#'
#' @return plot
#'
Expand All @@ -31,7 +32,7 @@
#' @export
vizClusters <- function(cells, ofInterest = NULL,
pointSize = 1, alpha = 0.5,
ref = NULL, dist = NULL){
ref = NULL, dist = NULL, lineWidth = 0.1){

## if cells are a data.frame with "x" and "y" cell coordinate columns
if( class(cells)[1] %in% c("data.frame", "matrix") ){
Expand Down Expand Up @@ -76,7 +77,7 @@ vizClusters <- function(cells, ofInterest = NULL,
## add to plot
plt <- plt +
ggplot2::geom_sf(data = neighborhood, fill = NA,
color = 'black', linewidth = .5)
color = 'black', linewidth = lineWidth)
}

## add labels
Expand Down
5 changes: 4 additions & 1 deletion man/vizClusters.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 4cd74bb

Please sign in to comment.