[R] How to draw a plot like this?

Yihui Xie xieyihui at gmail.com
Mon Sep 15 11:18:54 CEST 2008


I think the function split.screen() in 'graphics' package is enough
for this task. For example,

##
fig.loc = matrix(c(0, 1, 0, 1, 0.1, 0.6, 0.5, 0.9),
    2, byrow = T)
x = split.screen(fig.loc)
par(mar = c(3, 3, 1, 1))
screen(1)
plot(rnorm(100))
screen(2)
plot(rnorm(20), type = "h")

Yihui

On Mon, Sep 15, 2008 at 12:00 PM, Jinsong Zhao <jszhao at mail.hzau.edu.cn> wrote:
> Hi there,
>
> I hope to draw a plot like this:
> http://www.sg-chem.net/swizard/Ru-bqdi-spectra.gif
>
> is it possible to draw it using R?
>
> thanks for any suggestions.
>
> regards,
> Jinsong
>


-- 
Yihui Xie <xieyihui at gmail.com>
Phone: +86-(0)10-82509086 Fax: +86-(0)10-82509086
Mobile: +86-15810805877
Homepage: http://www.yihui.name
School of Statistics, Room 1037, Mingde Main Building,
Renmin University of China, Beijing, 100872, China



More information about the R-help mailing list