Open jefferis opened 5 years ago
Currently:
> catmaid:::plot3d.catmaidneuron function(x, WithConnectors=FALSE, WithNodes=FALSE, soma=FALSE, ...) { soma=plot3d_somarad(x, soma) rglreturnlist=NextMethod(WithNodes=WithNodes, soma=soma) if (WithConnectors) { conndf = connectors(x) # only try to plot if the neuron has connectors if (length(conndf)){ rglreturnlist[['synapses']] = points3d(xyzmatrix(conndf), col = c(pre ='red', post = 'cyan')[conndf$prepost + 1]) } } invisible(rglreturnlist) }
We need to change the return logic to match plot3d.neuron:
plot3d.neuron
if (plotengine == 'rgl'){ invisible(rglreturnlist) } else{ psh <- psh %>% plotly::layout(showlegend = FALSE, scene=list(camera=.plotly3d$camera)) assign("plotlyscenehandle", psh, envir=.plotly3d) psh }
and we need to add plotly support for the synaptic locations (i.e. instead of points3d)
points3d
@SridharJagannathan could you check if we can plot catmaid synapses in plotly in rstudio cloud? It may be that we need to fix this issue.
Currently:
We need to change the return logic to match
plot3d.neuron
:and we need to add plotly support for the synaptic locations (i.e. instead of
points3d
)