Displaying 10 results from an estimated 10 matches for "plotnode".
Did you mean:
plotcode
2015 Jan 01
1
Reimplement stats:::plotNode as iterative to avoid recursion limits?
Hi All,
I've gotten a number of reports from users about gplots::heatmap.2 generating 'node stack overflow' errors. As it turns out, these errors originate in stats:::plotNode, and are triggered when it is passed a dendrogram that is too deeply nested.
While increasing the stack size (which is a compile-time option for byte coded functions) can allow a particular instance to succeed, a better solution would be to modify stats:::plotNode to use a recursive, rather than i...
2011 Jan 25
1
dendrogram plot does not draw long labels ?
Hello,
It seems that the plot function for dendrograms does not draw labels when
they are too long.
> hc <- hclust(dist(USArrests), "ave")
> dend1 <- as.dendrogram(hc)
> dend2 <- cut(dend1, h=70)
> dd <- dend2$lower[[1]]
> plot(dd) # first label is drawn
> attr(dd[[1]], "label") <- "aaaaaaaaaaaaaaaaaa"
> plot(dd) # first label is
2005 Oct 23
1
Coloring leaves, twigs and labels in plot.dendrogram()
...ot;none"), dLeaf = NULL,
xlab = "", ylab = "", xaxt = "n", yaxt = "s", horiz = FALSE,
frame.plot = FALSE, twig.col = NULL, lab.col = NULL, leaf.col = NULL,
...){
############################## 80 Characters Wide
##############################
plotNode <- function (x1, x2, subtree, type, center, leaflab, dLeaf,
nodePar,
edgePar, horiz = FALSE, leafcounter = leafcounter, ...)
{
#cat('.') uncomment this for debugging...
inner <- !is.leaf(subtree) && x1 != x2
yTop <- attr(subtree, "height")
bx &...
2015 May 18
2
A "bug" in plot.dendrogram - can't plot lty with character color
...y" to become a character also.
dend %>% set("branches_lty", 1:2) %>% set("branches_col",
as.character(1:2)) %>%
unclass %>% str
Possible solution
==============
The simplest (and backward) compatible solution I can think of is to edit
the function:
stats:::plotNode
And change the following lines:
col <- Xtract("col", ePar, default = par("col"),
i)
lty <- Xtract("lty", ePar, default = par("lty"),
i)
lwd <- Xtract("lwd", ePar, def...
2008 Nov 08
0
Bug in plot.dendrogram, and how to submit patches
...; attr(d[[1]], "edgetext") <- "a & b"
> attr(d[[2]], "edgetext") <- "c & d"
> plot(d, horiz="F") #OK
> plot(d, horiz="T") #edge labels do not change position to account
for horiz
I think this is because stats:::plotNode doesn't deal with horiz=TRUE
on line 152 (starting "polygon(mx + c(-hl3, hl3),").
I'm quite happy to submit a patch to fix this, but I'm not sure how
to do so. Is there a web page which gives details about the preferred
format for patches, and how to download the latest...
2015 May 20
0
Probably a "bug" in the dendextend package
...e colors'' just for fun) [
Currently, I don't see a bug in R's dendrogram code
but rather in your package.
> Possible solution
> ==============
> The simplest (and backward) compatible solution I can think of is to edit
> the function:
> stats:::plotNode
> And change the following lines:
> col <- Xtract("col", ePar, default = par("col"),
> i)
> lty <- Xtract("lty", ePar, default = par("lty"),
> i)
> lwd <- Xtract("lwd", ePar, default = par("lw...
2004 May 10
3
Colouring hclust() trees
...identify().
The frustrating thing is that when I do
d <- dim(stuff))[1]
plot(1:d, 1:d, col=col[stuff.hc$order])
shows me that there _is_ a strong connection between the groups found by
hclust() and the predicted groups, albeit not a simple one.
I have looked at plot.dendrogram() and plotNode() -- using getAnywhere() --
and it looks to me as though what I want *should* be doable, but I've
clearly misunderstood the details of how to do it.
2004 Oct 21
3
error in plot.dendrogram (PR#7300)
Hi,
hres <- hclust(smatr,method="single")
hresd<-as.dendrogram(hres)
as.dendrogram(hres)
`dendrogram' with 2 branches and 380 members total, at height 2514.513
plot(hresd,leaflab="none") #<-error here.
#the plotted dendrogram is incomplete. The x axis is not drawn.
#The interested reader can download the
save(hresd,file="hres.rda")
#from the
2004 Apr 12
1
R 1.9.0 is release
...ce environments to lists
(efficiently).
o New function addmargins() in the stats package to add marginal
summaries to tables, e.g. row and column totals. (Based on a
contribution by Bendix Carstensen.)
o dendrogam edge and node labels can now be expressions (to be
plotted via stats:::plotNode called from plot.dendrogram).
The diamond frames around edge labels are more nicely scaled
horizontally.
o Methods defined in the methods package can now include
default expressions for arguments. If these arguments are
missing in the call, the defaults in the selected method will
overri...
2004 Apr 12
1
R 1.9.0 is release
...ce environments to lists
(efficiently).
o New function addmargins() in the stats package to add marginal
summaries to tables, e.g. row and column totals. (Based on a
contribution by Bendix Carstensen.)
o dendrogam edge and node labels can now be expressions (to be
plotted via stats:::plotNode called from plot.dendrogram).
The diamond frames around edge labels are more nicely scaled
horizontally.
o Methods defined in the methods package can now include
default expressions for arguments. If these arguments are
missing in the call, the defaults in the selected method will
overri...