[R] graph and coplot manipulations

Paul Murrell p.murrell at auckland.ac.nz
Fri Sep 6 02:25:54 CEST 2002


Hi


Adaikalavan Ramasamy wrote:
> 
> Dear all, I posted this a week ago without much success. I was hoping there
> is a kind soul out there who can shed some light onto the following. I am
> currently plotting a graph with the function coplot() conditional on two
> factors which gives me 36 sub-panels. I have a few questions in general
> about changing the size of the graph. My question follows :
>
> a) I have a fair bit of text to put on the margin sides using mtext(). What
> is the best way to shrink the whole graph to  say 80 - 90% so that I can
> include a bit more words.


You can control the size of the graph using par(pin), par(fin),
par(fig), par(mar), par(mai), par(oma), par(omi). 

You can use strwidth() to determine how much room you need (this will
work with a plot you don't plan on resizing anyway).

You can use layout().


> b) Since I am conditioning on two variables, the plot also automatically
> plots the words "Given : a" and "Given : a" on the top and right hand of the
> plot. I do not require this and would like them to be removed. How do I do
> that ?  (I have already set the option show.given = F)


Not sure.  May be a bug.  You may need to modify the code of coplot.


> and less importantly ...
>
> c) How does one change the labels on the sub-axis (either x of y) to a given
> vector.


Not sure what you mean there sorry.  


> d) How to rotate the axis label 45 degree counter clockwise. I tried
> par(las=1.5) etc without much luck.


Not possible currently via mtext().  You can do a kludge using text()
and trial-and-error to draw in the plot margins (you'll also need to set
par(xpd)).

Sorry I can't provide more detailed advice at the moment.  Lots on :)

Paul
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list