Skip to content

Commit

Permalink
Add camera scene
Browse files Browse the repository at this point in the history
  • Loading branch information
hhy082 committed Mar 26, 2021
1 parent d024702 commit 3b43ed7
Show file tree
Hide file tree
Showing 37 changed files with 99 additions and 50 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Package: volcano3D
Type: Package
Title: Interactive Plotting of Three-Way Differential Expression
Analysis
Version: 1.1.0
Version: 1.2.0
Authors@R: c(person("Katriona", "Goldmann", role = c("aut", "cre"),
email = "k.goldmann@qmul.ac.uk",
comment = c(ORCID = "0000-0002-9073-6323")),
Expand Down
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
News
=====

# volcano3D 1.2.0
###### 25/02/2021
* Add argument for scene camera in volcano3D

# volcano3D 1.1.0
###### 04/02/2021
* allow colour coding to be based on pvalue or adjusted pvalue according to cutoff_criteria
Expand Down
18 changes: 14 additions & 4 deletions R/volcano3D.R
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,12 @@
#' @param xy_aspectratio The aspect ratio for the xy axis compared to z
#' (default = 1). Decreasing this makes the grid wider in the plot window.
#' @param plot_height The plot height in px. Default=700.
#' @param camera_eye The (x,y,z) components of the 'eye' camera vector. This
#' vector determines the view point about the origin of this scene.
#' @param source a character string of length 1. Match the value of this string
#' with the source argument in \code{\link[plotly]{event_data}} to retrieve the
#' event data corresponding to a specific plot (shiny apps can have multiple
#' plots).
#' @param ... Optional parameters to pass to \code{\link{polar_grid}}.
#' @return Returns a cylindrical 3D plotly plot featuring variables on a
#' tri-axis radial graph with the -log10(multi-group test p-value) on the
Expand Down Expand Up @@ -115,6 +121,8 @@ volcano3D <- function(polar,
z_aspectratio = 1,
xy_aspectratio = 1,
plot_height = 700,
camera_eye = list(x=1.25, y=1.25, z=1.25),
source="volcano3D",
...){

if(! class(polar) %in% c("polar")) stop("polar must be a polar object")
Expand Down Expand Up @@ -286,7 +294,7 @@ volcano3D <- function(polar,
colors = switch(colour_scale,
"discrete" = colours,
"continuous" = NULL),
type = "scatter3d", mode = "markers") %>%
type = "scatter3d", mode = "markers", source = source) %>%

# Add the cylindrical grid
add_trace(x = polar_grid$x, y = polar_grid$y, z = polar_grid$z,
Expand Down Expand Up @@ -335,14 +343,16 @@ volcano3D <- function(polar,
plot_bgcolor = 'rgba(0, 0, 0, 0)',

scene = list(
aspectratio = list(x = xy_aspectratio,
y = xy_aspectratio,
camera = list(eye = camera_eye),
aspectratio = list(x = xy_aspectratio,
y = xy_aspectratio,
z = z_aspectratio),
dragmode = "turntable",
xaxis = axis_settings_xy,
yaxis = axis_settings_xy,
zaxis = axis_settings,
annotations = annot),
annotations = annot
),
xaxis = list(title = "x"),
yaxis = list(title = "y")
)
Expand Down
2 changes: 1 addition & 1 deletion docs/404.html

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

2 changes: 1 addition & 1 deletion docs/ReadMe.html

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

34 changes: 17 additions & 17 deletions docs/articles/Extended_Vignette.html

Large diffs are not rendered by default.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions docs/articles/Vignette.html

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

Binary file modified docs/articles/Vignette_files/figure-html/unnamed-chunk-13-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/articles/index.html

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

2 changes: 1 addition & 1 deletion docs/articles/pvalues_generator.html

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

2 changes: 1 addition & 1 deletion docs/articles/shiny_builder.html

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

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/authors.html

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

2 changes: 1 addition & 1 deletion docs/index.html

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

13 changes: 12 additions & 1 deletion docs/news/index.html

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

4 changes: 2 additions & 2 deletions docs/pkgdown.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
pandoc: '2.11'
pandoc: 2.11.4
pkgdown: 1.6.1
pkgdown_sha: ~
articles:
Extended_Vignette: Extended_Vignette.html
Vignette: Vignette.html
pvalues_generator: pvalues_generator.html
shiny_builder: shiny_builder.html
last_built: 2021-03-04T14:40Z
last_built: 2021-03-25T13:04Z

2 changes: 1 addition & 1 deletion docs/reference/boxplot_trio.html

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

2 changes: 1 addition & 1 deletion docs/reference/grid-class.html

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

2 changes: 1 addition & 1 deletion docs/reference/index.html

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

2 changes: 1 addition & 1 deletion docs/reference/polar-class.html

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

2 changes: 1 addition & 1 deletion docs/reference/polar_coords.html

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

2 changes: 1 addition & 1 deletion docs/reference/polar_grid.html

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

2 changes: 1 addition & 1 deletion docs/reference/radial_ggplot.html

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

2 changes: 1 addition & 1 deletion docs/reference/radial_plotly.html

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

2 changes: 1 addition & 1 deletion docs/reference/show_grid.html

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

2 changes: 1 addition & 1 deletion docs/reference/significance_subset.html

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

2 changes: 1 addition & 1 deletion docs/reference/syn_example_meta.html

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

2 changes: 1 addition & 1 deletion docs/reference/syn_example_p.html

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

2 changes: 1 addition & 1 deletion docs/reference/syn_example_rld.html

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

16 changes: 15 additions & 1 deletion docs/reference/volcano3D.html

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

2 changes: 1 addition & 1 deletion docs/reference/volcano_plot.html

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

2 changes: 1 addition & 1 deletion docs/reference/volcano_trio.html

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

Loading

0 comments on commit 3b43ed7

Please sign in to comment.