This package contains some vignettes that served as a talk relating to my plotlyutils package. This site was built in R using pkgdown.

Outline

The talk shows many examples of ggplotly, some examples of how to plot using the plotly R API, several functions which create plotly objects using the R API, and two custom htmlwidget written using JavaScript.

The custom plots are shown below.

A boxplot with jittered points

plotly_boxplot(iris[, -5])

A line plot with selectable y variable

set.seed(42)
df <- lapply(1:26, function(x) rnorm(50)) %>% 
    as.data.frame()
colnames(df) <- letters
df[["seq"]] <- 1:50

df %>% dropdown_lineplot(x="seq", yvars = letters)

A density plot of a matrix or data.frame

plotly_density(
    log2(assay(GBMdata[, 1:10]) + 0.5), 
    palette=colorspace::rainbow_hcl,
    xlab = "log<sub>2</sub>(reads + 0.5)") %>% 
    layout(showlegend = FALSE)