You are here:
Vanderbilt Biostatistics Wiki
>
Main Web
>
Seminars
>
RClinic
>
DrawingOutsidePlot
(revision 1)
Edit
Attach
This example code comes from section 3.4.3 "Annotating the margins" in Paul Murrell's "R Graphics" book --- Figure 3.19
y1 <- rnorm(100) y2 <- rnorm(100)
par(mfrow = c(2, 1), xpd = NA) # First figure plot(y1, type = "l", axes = FALSE, xlab = "", ylab = "", main = "") box(col = "grey") mtext("Left end of margin", adj = 0, side = 3) lines(x = c(20, 20, 40, 40), y = c(-7, max(y1), max(y1), -7), lwd = 3, col = "grey") # Second figure plot(y2, type = "l", axes = FALSE, xlab = "", ylab = "", main = "") box(col = "grey") mtext("Right end of margin", adj = 0, side = 3) mtext("Label below x = 30", at = 30, side = 1) lines(x = c(20, 20, 40, 40), y = c(7, min(y2), min(y2), 7), lwd = 3, col = "grey")
Edit
|
Attach
|
P
rint version
|
H
istory
:
r2
<
r1
|
B
acklinks
|
V
iew wiki text
|
Edit WikiText
|
More topic actions...
Topic revision: r1 - 08 Nov 2006,
TheresaScott
Main
Department Home Page
Biostatistics Graduate Program
Vanderbilt University Medical Center
Main Web
Main Web Home
Search
Recent Changes
Changes
Topic list
Biostatistics Webs
Archive
Main
Sandbox
System
Register
|
Log In
Copyright © 2013-2022 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Vanderbilt Biostatistics Wiki?
Send feedback