Questions tagged [ggdendro]

ggdendro package is a set of tools for extracting dendrogram and tree diagram plot data for use with ggplot

ggdendro is a set of tools for extracting dendrogram and tree plot data so that dendrograms and tree plots can be plotted using the package . The ggplot philosophy is to separate clearly the data from the presentation. Unfortunately the plot method for dendrograms plots directly to a plot device without exposing the data. The package resolves this by making available functions that extract the dendrogram plot data.

The reference manual can be accessed from here.

36 questions
0
votes
0 answers

How to reverse distance scale in ggdendrogram and to add label under the distance scale?

I am using ggdendrogram to construct a dendrogram based on Jaccard matrix. Is there a way to reverse the distance scale from 0 - 1 to 1 - 0 and to add text under the distance scale with ggdendrogram? Cheers.
0
votes
0 answers

Cut dendrogram / cluster: Error in function 'cutree': tree incorrect (composante 'merge')

I have a dendrogram which I want to cut into less clusters because right know there are too many for interpretation. My dataframe looks like this: > head(alpha) locs 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 1 …
tubby
  • 11
  • 1
  • 4
0
votes
0 answers

Coloring clusters in ggdendro with long labels

I am creating dendrograms using ggdendro and coloring them according to cutpoints in the branches. I'm using the approach provided by @jlhoward in this question (Colorize Clusters in Dendogram with ggplot2) but I run into problems when my leaf…
viralrna
  • 73
  • 4
0
votes
1 answer

Preserving label and legend color across 2 dendograms

Objective: I would like to preserve label color and legend color across 2 dendograms created for the same dataset. I have the same dataset (40 observations) that is converted into a dendogram in 2 processes (pre-filtered and filtered). However, the…
user10101904
  • 427
  • 2
  • 12
0
votes
1 answer

ggdendrogram for a large number of nodes

I'm trying to plot a dendrogram with a large number of nodes using ggdendrogram and it's pretty slow (compared to dendextend for example): set.seed(1) mat <- matrix(rnorm(100*10),nrow=100,ncol=10) dend <-…
dan
  • 6,048
  • 10
  • 57
  • 125
0
votes
1 answer

Equally spaced out lengths in dendrograms

In this diagram, the main information (most nodes) is on the extreme left side. I want to make the dendrogram easy to read and thus the edges should be proportionally long. Any specific arguments to be used or is it just the data's problem?
AbhiPat
  • 3
  • 3
1 2
3