Skip to content

Commit

Permalink
Limit granularity of density
Browse files Browse the repository at this point in the history
  • Loading branch information
pinin4fjords committed Dec 14, 2023
1 parent 38d1ecd commit 3a6409c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/accessory.R
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ ggplotify <- function(plotmatrices, experiment, colorby = NULL, value_type = "ex
allplotdata <- do.call(rbind, lapply(names(plotmatrices), function(pm) {
if (value_type == "density") {
plotdata <- do.call(rbind, lapply(colnames(plotmatrices[[pm]]), function(s) {
dens <- density(cond_log2_transform_matrix(plotmatrices[[pm]][, s], rmzeros = TRUE, should_log = should_log))
dens <- density(cond_log2_transform_matrix(plotmatrices[[pm]][, s], rmzeros = TRUE, should_log = should_log), n = 100)
data.frame(name = s, value = dens$x, density = dens$y)
}))
} else {
Expand Down

0 comments on commit 3a6409c

Please sign in to comment.