Displaying 16 results from an estimated 16 matches for "edgepar".
Did you mean:
edgar
2005 Dec 16
2
dendrogram branches with different lty
Dear r-list,
I am trying to visually seperate the two main clusters of a dendrogram.
The idea is to use:
'edgePar=list(lty=3)' for 'dend1[[1]]' and
'edgePar=list(lty=1)' for 'dend1[[2]]'
I have not found a way to solve this. Any suggestions?
Patrick
hc <- hclust(dist(USArrests), "ave")
(dend1 <- as.dendrogram(hc))
par(mfrow=c(2,2))
plot(dend1)
plot(dend1[[1]],edge...
2007 Jun 13
2
Formatted Data File Question for Clustering -Quickie Project
...;str()" method
str(dend1, max = 2) # only the first two sub-levels
op <- par(mfrow= c(2,2), mar = c(5,2,1,4))
plot(dend1)
## "triangle" type and show inner nodes:
plot(dend1, nodePar=list(pch = c(1,NA), cex=0.8, lab.cex = 0.8),
type = "t", center=TRUE)
plot(dend1, edgePar=list(col = 1:2, lty = 2:3), dLeaf=1, edge.root =
TRUE)
plot(dend1, nodePar=list(pch = 2:1,cex=.4*2:1, col = 2:3), horiz=TRUE)
dend2 <- cut(dend1, h=70)
plot(dend2$upper)
## leafs are wrong horizontally:
plot(dend2$upper, nodePar=list(pch = c(1,7), col = 2:1))
## dend2$lower is *NOT* a dendrogr...
2005 Oct 23
1
Coloring leaves, twigs and labels in plot.dendrogram()
...ul feature to have....
Or is there an easier way of doing this that I have missed?
Walton Green
* * *
my.dend.plot <- function (x, type = c("rectangle", "triangle"),
center = FALSE, edge.root = is.leaf(x) || !is.null(attr(x,
"edgetext")), nodePar = NULL, edgePar = list(),
leaflab = c("perpendicular", "textlike", "none"), dLeaf = NULL,
xlab = "", ylab = "", xaxt = "n", yaxt = "s", horiz = FALSE,
frame.plot = FALSE, twig.col = NULL, lab.col = NULL, leaf.col = NULL,
...){
####...
2015 May 18
2
A "bug" in plot.dendrogram - can't plot lty with character color
...t;% plot # works fine
# Fails:
dend %>% set("branches_lty", 1:2) %>% set("branches_col",
as.character(1:2)) %>% plot
### Error:
# Error in segments(x0, y0, x1, y1, col = col, lty = lty, lwd = lwd) :
# invalid line type: must be length 2, 4, 6 or 8
# This is because edgePar has to hold both "lty" and "col"
# Since "col" is a character, it forces "lty" to become a character also.
dend %>% set("branches_lty", 1:2) %>% set("branches_col",
as.character(1:2)) %>%
unclass %>% str
Possible solution...
2011 Dec 12
1
how to colour labels (each label with a colour) in a dendrogram?
...rogram(hc))
plot(dend1)
labels (USArrests) [[1]] # to know how many cities (labels) = 50
nP <- list(col=3:2, cex=c(2.0, 0.75), pch= 21:22,
bg= c("light blue", "pink"),
lab.cex = 0.75, lab.col = 1:50) # or use a palette:
palette(rainbow(50))
plot(dend1, edgePar=nP, dLeaf=1, edge.root = TRUE)
# this option is not correct. I want each of my labels (text) have a
different colour but that is not what is happening. How can I do that?
I'd appreciate your help.
thanks a lot again.
Barbara
On 9 December 2011 13:44, barbara costa <rbarbarahc@gmail.com>...
2015 May 20
0
Probably a "bug" in the dendextend package
...ttr pipe mumbo-jumbo does not make it easy
to deparse what you are doing ... and below you see why I think
the bug is only in your 'dendextend' package.
Please -- for supposed bugs in R, we do need reproducible examples *not*
making use of external packages !
> # This is because edgePar has to hold both "lty" and "col"
> # Since "col" is a character, it forces "lty" to become a character also.
This is nonsense, sorry: If you'd read the help for plot.dendrogram(),
edgePar is clearly defined as list, not vector, so it can well
cont...
2012 Apr 30
2
Generate Dendrogram
...8, lab.cex = 0.8)).
But I got warning and the plot does not look like what I wanted.
Warning messages:
In plot.hclust(hc.obj, xlab = "", ylab = "", sub = "", nodePar =
list(pch = c(1, :
"nodePar" is not a graphical parameter
It also can not recognize
edgePar=
dLeaf=
edge.root
Does someone know what's wrong?
Br,
Luffy
2015 May 20
1
Probably a "bug" in the dendextend package
Dear Martin,
You are right. When implementing the dendextend::set function, I failed to
notice that edgePar should accept a list instead of a vector. So all I did
was to discover a bug in my own code.
I am both sorry for taking your time due to my own mistake, and
also grateful for your help (I will resolve this bug before submitting the
next release to CRAN).
I am sure that I would have had similar fee...
2011 Dec 09
1
how to add an edgetext to a dendrogram?
...;ave")
plot(dend1)
labels (USArrests) [[1]] # to know how many cities (labels) = 50
nP <- list(col=3:2, cex=c(2.0, 0.75), pch= 21:22,
bg= c("light blue", "pink"),
lab.cex = 0.75, lab.col = 1:50) # or use a palette:
palette(rainbow(50))
plot(dend1, edgePar=nP, dLeaf=1, edge.root = TRUE)
# this option is not correct. I want each of my labels (text) have a
different colour but that is not what is happening. How can I do that?
I'd appreciate your help.
thanks a lot
Barbara
[[alternative HTML version deleted]]
2007 Mar 09
1
dendrogram - got it , just need to label :)
Hi all, Hi Gavin,
thx for your help i finally found out what i want to do and how to
fix it.
just needed to get some more level my cut level was too small...
two question remain...
a) can i somehow scale the twigs after cutting ?
b) how can i label the nodes and how to label which one...
thx !!
-m.
2009 Apr 03
0
dendrogram rect.hclust() not working?
...r even in one orientation)?
Alternatively, is there a way to modify the thickness and color of the
edges that draw down from a "significant" node?
I tried adding this to my markSignificantClusters() function, within
the "if (nodesContainCertainLeaves)" block, to modify the edgePar
settings of a qualifying node, to no effect:
n <- dendrapply(n, function(e) { attr(e, "edgePar") <- list(lty=3,
col="red"); e })
If you got this far through this message, thanks. :) I would be
grateful for any advice.
Thanks,
Alex
2005 Jul 11
1
indexing into and modifying dendrograms
...1[[2]][[1]] 1
## use cNum attribute in "edgetext"
## following example in dendrogram documentation
## would really rather associate with the node than the edge
## but current plotting function has no notion of nodetext
addE <- function(n) {
if(!is.leaf(n)) {
attr(n, "edgePar") <- list(p.col="plum")
attr(n, "edgetext") <- attr(n,"cNum")
}
n
}
dend2 <- dendrapply(dend1, addE)
## overlays the cNum ("cluster number") attribute on dendrogram
plot(dend2, main = "dend2")
## why does no plum polygon app...
2005 Mar 18
0
Changing label size in plot.dendrogram
...m'
using an own function, and I'm using the R function
plot.dendrogram for visualizing it.
It works fine, but I could not find out how to change
the font size of edge and leaf labels.
?plot.dendrogram has shown me that the coloring of the
edge labels can be changed using plot(my.dendrogram,
edgePar=list(t.col='green')), but something like
't.cex' doesn't seem to exist.
Any hints greatly appreciated.
Best regards,
Michael
2003 Sep 27
3
coloring dendrgram in heatmap?
Using the heatmap function in mva, it seems to be hard to use different
colors in the edges leading to different groups of objects, as commonly done
in many heatmaps in the microarray graphics. Any suggestions? Thanks.
max
2004 Oct 04
7
R 2.0.0 is released
...re
preserved.
o data.frame(check.names = TRUE) (the default) enforces unique
names, as S does.
o .Defunct() now has 'new' and 'package' arguments like those of
.Deprecated().
o The plot() method for "dendrogram" objects now respects many more
nodePar and edgePar settings and for edge labeling computes the
extents of the diamond more correctly.
o deparse(), dput() and dump() have a new 'control' argument to
control the level of detail when deparsing. dump() defaults to
the most detail, the others default to less. See ?.deparseOpts
for the...
2004 Oct 04
7
R 2.0.0 is released
...re
preserved.
o data.frame(check.names = TRUE) (the default) enforces unique
names, as S does.
o .Defunct() now has 'new' and 'package' arguments like those of
.Deprecated().
o The plot() method for "dendrogram" objects now respects many more
nodePar and edgePar settings and for edge labeling computes the
extents of the diamond more correctly.
o deparse(), dput() and dump() have a new 'control' argument to
control the level of detail when deparsing. dump() defaults to
the most detail, the others default to less. See ?.deparseOpts
for the...