plot overlay
1
0
Entering edit mode
David Ruau ▴ 190
@david-ruau-1562
Last seen 9.6 years ago
Hi, I am trying to plot 2 plots in the same PDF. The plot are 2 identical dendrograms except for the leave's label (some labels are empty). I would like to plot the first one in red and the second one in black. The idea I have is to use the second one as a mask hiding the red dendrogram on the common part. > class(dend1) [1] "dendrogram" > class(dend2) [1] "dendrogram" ##### Here the plot are merged but everything is red > pdf(file="color_dendrogram.pdf", height=100, width=400) > plot(dend2, col="red", panel.last=plot(dend1, col="black")) > dev.off() ##### Here the plot are merged but everything is black... > plot(dend2, panel.first=par(col="red"), panel.last=plot(dend1, panel.first=par(col="black"))) The final graph should be black (from dend1) and some of the label red (from dend2). David > sessionInfo() R version 2.7.0 (2008-04-22) x86_64-unknown-linux-gnu locale: C attached base packages: [1] tools stats graphics grDevices utils datasets methods [8] base other attached packages: [1] lattice_0.17-6 bioDist_1.10.0 Biobase_2.0.1 loaded via a namespace (and not attached): [1] grid_2.7.0
graph graph • 881 views
ADD COMMENT
0
Entering edit mode
@olszewskiatlas-biolabsde-2855
Last seen 9.6 years ago
try: > pdf(file="color_dendrogram.pdf", height=100, width=400) > plot(dend2, col="red") > plot(dend1, col="black", add=T) > dev.off() ----------------------------------------- This email was sent from ATLAS Biolabs GmbH, Koeln/Cologne & Berlin. Sitz der Gesellschaft/Registered Office: Koeln/Cologne, Germany. Registergericht/Commercial Register Koeln/Cologne No HRB 59119, USt- IdNr: DE251633620 Diese E-Mail kann Betriebs- oder Geschaeftsgeheimnisse oder sonstige vertrauliche Informationen enthalten. Sollten Sie diese E-Mail irrtuemlich erhalten haben, ist Ihnen eine Kenntnisnahme des Inhalts, eine Vervielfaeltigung oder Weitergabe der E-Mail ausdruecklich untersagt. Bitte benachrichtigen Sie uns und vernichten Sie die empfangene E-Mail. Vielen Dank. This e-mail may contain trade secrets or privileged, undisclosed, or otherwise confidential information. If you have received this e-mail in error, you are hereby notified that any review, copying, or distribution of it is strictly prohibited. Please inform us immediately and destroy the original transmittal. Thank you for your cooperation.
0
Entering edit mode
Thanks for the answer but that doesn't work at least in my hand. It produce a PDF document with 2 pages all in black (default color). For producing a graph in color you have to do this: par(col="red") plot(dend1) I am still stuck with this problem of having some label of the tree in one or another color. the plclust() has a labels option but but no color option... David On Jul 2, 2008, at 3:15 PM, olszewski at atlas-biolabs.de wrote: > try: > >> pdf(file="color_dendrogram.pdf", height=100, width=400) >> plot(dend2, col="red") >> plot(dend1, col="black", add=T) >> dev.off() > >
ADD REPLY

Login before adding your answer.

Traffic: 1130 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6