Plot dendrogram to webpage and view.

Share:

Description

Plot dendrogram to webpage and view.

Usage

1
2
d3dendrogram(d, height = 500, width = 700, rightmargin = 200,
  open = TRUE, ...)

Arguments

d

a dendrogram object

height

pixels, height of the plot.

width

pixels, width of the plot

rightmargin

pixels to reserve on the right side for leaf labels.

open

open the graphic in a browser? (see details).

...

Graphical options, see d3dendro_options.

Details

If open=TRUE, the graphic is opened using the function defined by getOption("viewer"). If no viewer option is specified, utils::browseURL is opened. Specifically, in RStudio this means that the viewer is used.

Value

If open=TRUE, a character string containing the html is invisibly retured. If open=TRUE, a character string containing the html is returned.

Tips

Dendrogram plots with many end-nodes tend to get overlapping labels or (end)nodes. If the number of endnodes is not too large, there are several ways to overcome this.

  • Decrease font size of the nodes (node_font, see d3dendro_options on how to specify)

  • Decrease size of node radius (node_radius, idem)

  • Increase the height of the plot. Use about (2 times font height) times count_terminal_nodes(d).

  • Plot sub-dendrograms in stead of the whole dendrogram. There's only so much detail a screen can display and your eye can observe. Consider plotting subdendrograms or other summaries when dendrograms have many, many nodes.

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.