scatterplot_rjs {RJSplot} | R Documentation |
Produce and interactive Scatter plot (XY plot).
Description
scatterplot_rjs
generates an interactive Scatter Plot.
Usage
scatterplot_rjs(x, y, id = NULL, xlab = "", ylab = "",
xlim = NULL, ylim = NULL, col = NULL,
pch = NULL, abline.x = NULL, abline.y = NULL, cex = 1,
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. |
id |
a vector giving the id of each point. |
xlab |
a title for the x axis. |
ylab |
a title for the y axis. |
xlim |
a vector with two values which specifies the X minimun and maximun values in the representation. |
ylim |
a vector with two values which specifies the Y minimun and maximun values in the representation. |
col |
a vector with the colour of each represented point. |
pch |
a character vector with the shape of each point. It should be one of: 1-"circle", 2-"triangle-up", 3-"cross", 4-"square", 5-"diamond", 6-"triangle-down". |
abline.x |
a numeric vector with x coordenates where a vertical line will be placed. |
abline.y |
a numeric vector with y coordenates where a horizontal line will be placed. |
cex |
number indicating the amount by which plotting text and symbols should be scaled relative to the default. |
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
## Create an interactive Scatter plot in a temporal directory of your local machine
## Live examples on https://rjsplot.usal.es
if(interactive()){
# Scatter plot creation
scatterplot_rjs(iris$Sepal.Width, iris$Sepal.Length,
abline.x = c(3.4,3.8), abline.y = c(5.8,7),
col = iris$Species, pch = as.numeric(iris$Species), id = iris$Species,
xlab = "Sepal Width (cm)", ylab = "Sepal Length (cm)")
}