Skip to content

Commit

Permalink
fixes to ggneuron to see split neurons
Browse files Browse the repository at this point in the history
  • Loading branch information
alexanderbates committed Nov 24, 2024
1 parent a501ca8 commit 10a19ba
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions R/ggplot2.R
Original file line number Diff line number Diff line change
Expand Up @@ -617,8 +617,8 @@ geom_neuron.synapticneuron <- function(x = NULL,
inherit.aes = inherit.aes,
...)
if(!is.null(x$connectors)){
syns.in <- nat::xyzmatrix(subset(x$connectors, x$connectors$prepost==1))
syns.out <- nat::xyzmatrix(subset(x$connectors, x$connectors$prepost==0))
syns.in <- nat::xyzmatrix(x$connectors[x$connectors$prepost == 1,])
syns.out <- nat::xyzmatrix(x$connectors[x$connectors$prepost == 0,])
if(!is.null(rotation_matrix)){
syns.in <- as.data.frame(t(rotation_matrix[,1:3] %*% t(syns.in)))
syns.in <- syns.in[,-4]
Expand Down Expand Up @@ -765,8 +765,8 @@ geom_neuron.splitneuron <- function(x = NULL,

# And synapses?
if(!is.null(x$connectors)){
syns.in <- nat::xyzmatrix(subset(x$connectors, x$connectors$prepost==1))
syns.out <- nat::xyzmatrix(subset(x$connectors, x$connectors$prepost==0))
syns.in <- nat::xyzmatrix(x$connectors[x$connectors$prepost == 1,])
syns.out <- nat::xyzmatrix(x$connectors[x$connectors$prepost == 0,])
if(!is.null(rotation_matrix)){
syns.in <- as.data.frame(t(rotation_matrix[,1:3] %*% t(syns.in)))
syns.in <- syns.in[,-4]
Expand Down

0 comments on commit 10a19ba

Please sign in to comment.