[R] layout.show()

Adaikalavan Ramasamy gisar at nus.edu.sg
Thu Apr 17 04:22:16 CEST 2003


You can partition the plotting region into an arrangement of smaller
plotting regions using nf <- layout(...). This allows you to put several
plots of different sizes on the same graph. Layout also allows you to
control where the sub plots go.

But it can be difficult to know if you have entered the correct
parameters else the ordering or number of plots can be screwed up.
layout.show(nf) shows you the locations where the 1st, 2nd, ... graph
will be plotted. 

Not only is it a very handy check before you plot but you can reuse the
same design if you plan on doing this repeatedly. Calling layout.show()
AFTER plotting a graph will certainly destroy the previous plot. Try
running the example in layout().


-----Original Message-----
From: Wladimir Eremeev [mailto:wl at eimb.ru] 
Sent: Thursday, April 17, 2003 2:35 AM
To: r-help at stat.math.ethz.ch
Subject: [R] layout.show()


Dear r-help,

  Please, be so kind, tell me what does mean the parameter of
layout.show()?
  I use R 1.6.2... Windows NT 4.0
  
  Unfortunately I cannot understand phrases from the help
  "n: number of figures to plot."
        what figures?

  "`layout.show(n)' plots (part of) the current layout, namely the
    outlines of the next `n' figures."

    what figures?
    what does 'next' mean?

 I'm still trying to draw a legend outside a graph :)

    layout(matrix(c(1:2))) creates a wonderful layout.

calls to

    plot.formula(...
    lines(...
    points(...
    axis(1,at=c(1979:2002));

draw a beautiful graph.

but call to
    layout.show(1) (or any other parameter instead of 1) destroys it.

what should I say to the R to make it keep already drawn graphs and show
a legend on the other "panel" of the layout?
-- 
Best regards
Wladimir Eremeev                                     mailto:wl at eimb.ru

========================================================================
==
Research Scientist                                Leninsky Prospect 33,
Space Monitoring & Ecoinformation Systems Sector, Moscow, Russia,
119071,
Institute of Ecology,                             Phone: (095) 135-9972;
Russian Academy of Sciences                       Fax: (095) 954-5534

______________________________________________
R-help at stat.math.ethz.ch mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help



More information about the R-help mailing list