Skip to content

line joining graphs

5 messages · rajesh j, Eik Vettorazzi, Ben Bolker +2 more

#
hi,
you can use par(xpd=TRUE)  and draw the joining line in every sub graph 
-  don't know if there is another way with simple graphs
eg:

par(mfcol=c(1,2))
plot(1,1,xlim=c(0,5),main="1st")
op<-par(xpd=TRUE)
abline(h=1)

plot(1,1,xlim=c(0,5),main="2nd")
abline(h=1)

hth.

rajesh j schrieb:
#
rajesh j <akshay.rajesh <at> gmail.com> writes:
try par(xpd=NA)

  ?segments may be useful too
#
Paul Murrell's book provides such an example using Grid (figure 5.22).  
A short example is available on his website:

http://www.stat.auckland.ac.nz/~paul/grid/doc/moveline.pdf

It may be possible to use this in conjunction with gridBase.


baptiste
On 22 Feb 2009, at 20:43, Eik Vettorazzi wrote:

            
_____________________________

Baptiste Augui?

School of Physics
University of Exeter
Stocker Road,
Exeter, Devon,
EX4 4QL, UK

Phone: +44 1392 264187

http://newton.ex.ac.uk/research/emag
#
You may want to look at the examples for the cnvrt.coords function in the TeachingDemos package for some ideas on how to draw lines between plots.  However, it is better to use the grconvertX and grconvertY functions rather than the cnvrt.coords function (it will be deprecated one of these days).

Hope this helps,