Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

R: package ggdendro plotting labels disppear

When I use the great package ggdendro to plot my tree, I come across a problem: One day, all labels of the tree it produces suddenly all disappeared.

When I run the following code in my local machine and in server, I get different results. No labels in local machine and labels do exist in the server version.

fit = ClustOfVar::hclustvar(X.quanti = mtcars)

ggdendro::ggdendrogram(as.dendrogram(fit),rotate = TRUE)

Server Version(OK): enter image description here

Local Windows 7 Version(No labels): enter image description here

I printed the session info as well for references.

dput compare(the same) enter image description here:

like image 703
John Avatar asked Oct 30 '22 04:10

John


1 Answers

This issue has been fixed in the latest development version of ggdendro, version 0.1.19

The underlying issue is described at issue #24. This bug was exposed in a change of behaviour in ggplot2, and causes a problem with the scales package version 0.4. To be clear - the bug was in ggdendro, not ggplot2 or scales, but never surfaced when using earlier versions of scales.

This version is not yet on CRAN, so use devtools to get the latest version:

devtools::install_github("andrie/ggdendro")

Update. Version 0.1-20 of ggdendro is now available on CRAN.

like image 192
Andrie Avatar answered Nov 15 '22 07:11

Andrie