Skip to content

Commit

Permalink
Update ggplot2.R
Browse files Browse the repository at this point in the history
  • Loading branch information
alexanderbates committed Jul 23, 2024
1 parent b55012c commit 499f865
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/ggplot2.R
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ geom_neuron.neuron <- function(x = NULL, rotation_matrix = NULL, root = 3, cols
stat = stat, position = position, na.rm = na.rm,
show.legend = show.legend, inherit.aes = inherit.aes, ...),
ggplot2::geom_point(mapping = ggplot2::aes(x = .data$X, y = .data$Y), data = soma,
color = low, alpha = 0.5, size = root),
color = cols[1], alpha = 0.5, size = root),
ggplot2::scale_color_gradient(low = cols[1], high = cols[length(cols)]),
ggnewscale::new_scale_colour()
)
Expand Down Expand Up @@ -411,7 +411,7 @@ geom_neuron.neuronlist <- function(x = NULL, rotation_matrix = NULL, root = 3, c
}
}else{
if(cols[1]=="rainbow"){
cols <-c("darkred","red")
cols <-c("purple","pink")
}
for(i in 1:length(x)){
glist[[i]] <- geom_neuron(x = x[[i]], rotation_matrix = rotation_matrix, cols = cols,
Expand Down

0 comments on commit 499f865

Please sign in to comment.