[R] How to put line linking two plots

Mario Valle mvalle at cscs.ch
Wed Mar 30 11:54:08 CEST 2011


Hello!
Suppose I have three charts like below. The top chart is a general 
overview and the bottom charts are related so some point of this chart.
To make clear this relationship I want to draw a line between (4,0.9) in 
the top chart and (10,1) in the bottom-left one.
Currently I add it manually using Inkscape on the resulting pdf file.
Is it possible to add it inside R? Should I switch to other charting 
packages?
Thanks for the advice!
                                                 mario

set.seed(123)
pdf("test.pdf", width=14, height=7)
layout(matrix(c(1,1,2,3), 2, 2, byrow = TRUE))
plot(runif(10), type='b')
plot(runif(20), type='l')
plot(runif(20), type='l')
dev.off()

R 2.12.2 on Windows 7 (32bits)

-- 
Ing. Mario Valle
Data Analysis and Visualization Group            | http://www.cscs.ch/~mvalle
Swiss National Supercomputing Centre (CSCS)      | Tel:  +41 (91) 610.82.60
v. Cantonale Galleria 2, 6928 Manno, Switzerland | Fax:  +41 (91) 610.82.82



More information about the R-help mailing list