Skip to content

Commit

Permalink
Updated after review comments from Greg, fixing params with inheritpa…
Browse files Browse the repository at this point in the history
…rams, updated grid lines for boundingbox.
  • Loading branch information
SridharJagannathan committed Jul 25, 2020
1 parent 1095f00 commit c98c69f
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 10 deletions.
2 changes: 0 additions & 2 deletions R/cmtkreg.R
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,6 @@ cmtkreg.filetype <- function(x) {
#' @param x A cmtk registration (the path to the registration folder on disk) or
#' the resulting of reading one in with \code{\link{read.cmtkreg}}.
#' @param ... Additional arguments passed to \code{\link[rgl]{plot3d}}
#' @param gridlines Whether to display gridlines when using plotly as the backend plotting
#' engine (default: \code{FALSE})
#' @inheritParams plot3d.neuronlist
#'
#' @seealso \code{\link{cmtkreg}}, \code{\link{read.cmtkreg}},
Expand Down
2 changes: 0 additions & 2 deletions R/dotprops.R
Original file line number Diff line number Diff line change
Expand Up @@ -306,8 +306,6 @@ all.equal.dotprops<-function(target, current, check.attributes=FALSE,
#' \code{alpha}
#' @param ... Additional arguments passed to \code{points3d} and/or
#' \code{segments3d}
#' @param gridlines Whether to display gridlines when using plotly as the backend plotting
#' engine (default: \code{FALSE})
#' @inheritParams plot3d.neuronlist
#' @return invisible list of results of rgl plotting commands
#'
Expand Down
2 changes: 0 additions & 2 deletions R/hxsurf.R
Original file line number Diff line number Diff line change
Expand Up @@ -357,8 +357,6 @@ write.hxsurf <- function(surf, filename) {
#' function that will be called with the number of materials to plot. When
#' \code{NULL} (default) will use material colours defined in Amira (if
#' available), or \code{rainbow} otherwise.
#' @param gridlines Whether to display gridlines when using plotly as the backend plotting
#' engine (default: \code{FALSE})
#' @param ... Additional arguments passed to \code{triangles3d}
#' @inheritParams plot3d.neuronlist
#' @export
Expand Down
9 changes: 6 additions & 3 deletions R/neuron-plot.R
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
#' \code{FALSE}). When \code{soma=TRUE} the radius is hard coded to 2.
#' @param ... Additional arguments passed to \code{\link[rgl]{lines3d}} (and
#' \code{\link[rgl]{spheres3d}} if somata are being plotted).
#' @param gridlines Whether to display gridlines when using plotly as the backend plotting
#' engine (default: \code{FALSE})
#' @inheritParams plot3d.neuronlist
#'
#' @return list of rgl plotting ids (invisibly) separated into \code{lines},
Expand Down Expand Up @@ -554,7 +552,7 @@ plot.neuron <- function(x, WithLine=TRUE, WithNodes=TRUE, WithAllPoints=FALSE,
#' }
#'
plot3d.boundingbox <- function(x, col='black',
plotengine = getOption('nat.plotengine'), ...) {
gridlines = FALSE, plotengine = getOption('nat.plotengine'), ...) {
plotengine <- check_plotengine(plotengine)
pts <- matrix(c(
c(x[1, 1], x[1, 2], x[1, 3]),
Expand Down Expand Up @@ -588,6 +586,11 @@ plot3d.boundingbox <- function(x, col='black',
x = ~X, y = ~Y , z = ~Z,
hoverinfo = "none", type = 'scatter3d', mode = 'lines',
opacity = opacity, line=list(color = col, width = width))
if(gridlines == FALSE){
psh <- psh %>% plotly::layout(scene = list(xaxis=.plotly3d$xaxis,
yaxis=.plotly3d$yaxis,
zaxis=.plotly3d$zaxis))
}
.plotly3d$plotlyscenehandle <- psh
psh
}
Expand Down
3 changes: 3 additions & 0 deletions inst/WORDLIST
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ dfc
dfs
dir
dirname
DL
dof
doi
donttest
Expand All @@ -64,6 +65,7 @@ dZ
edgelist
eg
eigen
elmr
Endianness
EndPoints
enh
Expand All @@ -72,6 +74,7 @@ especiall
etc
Evers
exe
FAFB
FCWB
fftw
fijitraces
Expand Down
11 changes: 10 additions & 1 deletion man/plot3d.boundingbox.Rd

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

0 comments on commit c98c69f

Please sign in to comment.