scatter3d_rjs: Produce and interactive 3D Scatter plot (XYZ plot).

Description Usage Arguments Value Author(s) See Also Examples

View source: R/three.R

Description

scatter3d_rjs generates an interactive 3D Scatter Plot.

Usage

1
2
scatter3d_rjs(x, y, z, color="#000", xlab = "x", ylab = "y", zlab = "z",
              plot = TRUE, jupyter = FALSE, dir = tempdir())

Arguments

x

a vector with the x data of each point.

y

a vector with the y data of each point.

z

a vector with the z data of each point.

xlab

a title for the x axis.

ylab

a title for the y axis.

zlab

a title for the z axis.

color

a vector with the colour of each represented point.

plot

open resulting graph in your browser.

jupyter

embed the graph as an iframe into a Jupyter Notebook.

dir

a "character" string representing the directory where the graph will be saved.

Value

The function creates a folder in your computer with an HTML document named index.html which contains the graph. This file can be directly opened with your browser.

Author(s)

David Barrios and Carlos Prieto. Bioinformatics Service of Nucleus, University of Salamanca. See https://bioinfo.usal.es/

See Also

The ‘RJSplot’ Website: https://rjsplot.usal.es

dendrogram_rjs, densityplot_rjs, genomemap_rjs, heatmap_rjs, manhattan_rjs, network_rjs, scatterplot_rjs, symheatmap_rjs, wordcloud_rjs, boxplot_rjs, bubbles_rjs, hiveplot_rjs, piechart_rjs, barplot_rjs, tables_rjs, surface3d_rjs, scatter3d_rjs.

Examples

1
2
3
4
5
6
7
8
9
## Create an interactive 3D Scatter plot in a temporal directory of your local machine
## Live examples on https://rjsplot.usal.es

# 3D Scatter plot creation
if(interactive()){
scatter3d_rjs(iris$Sepal.Width, iris$Sepal.Length, iris$Petal.Width,
  color = iris$Species, xlab = "Sepal Width (cm)", ylab = "Sepal Length (cm)",
  zlab = "Petal Width (cm)")
}

RJSplot documentation built on Dec. 11, 2021, 9:36 a.m.