plot_dendro: Plot an interactive dendrogram

Description Usage Arguments Author(s) See Also Examples

View source: R/plotly.R

Description

This function takes advantage of nested key selections to implement an interactive dendrogram. Selecting a node selects all the labels (i.e. leafs) under that node.

Usage

1
2
plot_dendro(d, set = "A", xmin = -50, height = 500, width = 500,
  ...)

Arguments

d

a dendrogram object

set

defines a crosstalk group

xmin

minimum of the range of the x-scale

height

height

width

width

...

arguments supplied to subplot()

Author(s)

Carson Sievert

See Also

plot_ly(), plot_mapbox(), ggplotly()

Examples

1
2
3
4
5
6
7
8
## Not run: 
hc <- hclust(dist(USArrests), "ave")
dend1 <- as.dendrogram(hc)
plot_dendro(dend1, height = 600) %>% 
  hide_legend() %>% 
  highlight(persistent = TRUE, dynamic = TRUE)

## End(Not run)

plotly documentation built on Nov. 8, 2019, 1:07 a.m.