RE: [R] layout.show()

About this list Date view Thread view Subject view Author view Attachment view

From: Adaikalavan Ramasamy (gisar@nus.edu.sg)
Date: Thu 17 Apr 2003 - 12:22:16 EST


Message-id: <024D6AEFCB92CB47BA1085751D184BB80105F242@MBXSRV03.stf.nus.edu.sg>

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@eimb.ru]
Sent: Thursday, April 17, 2003 2:35 AM
To: r-help@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@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@stat.math.ethz.ch mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help

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


About this list Date view Thread view Subject view Author view Attachment view

This archive was generated by hypermail 2.1.3 : Tue 01 Jul 2003 - 09:11:42 EST