Re: [R] graphical parameters: margins

2007-01-03 Thread Ricardo Rodríguez - Your XEN ICT Team
 Prof Brian Ripley[EMAIL PROTECTED] 3/1/2007 09:22 

In this particular case 'An Introduction to R' has a comprehensive 
description of graphical parameters with figures (as do all good books on 
S/R e.g. MASS4 - since it has the same first author).
 
Thanks, Brian,
 
I've reached both Introduction to R, particularly 
http://cran.r-project.org/doc/manuals/R-intro.html#Figure-margins, and MASS4 at 
Springer website. I think it is worth I ask the Three Wise Men for MASS4 as a 
present!
 
Greetings,
 
Ricardo

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] graphical parameters: margins

2007-01-02 Thread Ricardo Rodríguez - Your XEN ICT Team
Hi all,
 
Please, while using image() which is the graphical parameter which control the 
space between ylab and the y axis? I do need to write a number of relatively 
long y labels and I am not able the control, if possible, this space.

See the effect I need to avoid...

http://nvx.environmentalchange.net/@rrodriguez/images/overlapping.jpg

Thanks for your help,

Ricardo

--
Ricardo Rodríguez
Your XEN ICT Team

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] graphical parameters: margins

2007-01-02 Thread Ricardo Rodríguez - Your XEN ICT Team


--
Ricardo Rodríguez
Your XEN ICT Team

 Gavin Simpson[EMAIL PROTECTED] 2/1/2007 17:44 

Either of these two gives you the answer

 help.search(graphical parameters)
 RSiteSearch(graphical parameters margin)

more specifically, read ?par and in particular, the entry for parameter
'mar' and it's relatives.

You might also need to add the axis label separately from the figure:

opar - par(mar = c(5,7,4,2) +0.1)
plot(1:10, ann = FALSE) # or plot(1:10, ylab = )
mtext(label, side = 2, line = 6)
par(opar)

1) opar - par(mar = c(5,7,4,2) +0.1) creates 7.1 lines on the left of
the plot and saves defaults
2) mtext(label, side = 2, line = 6) displays the axis label on line 6
to push it away from the plot axis. Repeat for other sides...
3) par(opar) resets to the defaults.

HTH

Thanks Gavin,

I frequently reach the help page or any other document concerning the doubt, 
but at least for me it is by no means easy to correctly interpret their 
contents without the help of more experienced people. I do hope  I will catch 
up ASAP!

Cheers,

Ricardo
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] tabulate: switching columns and rows

2006-12-31 Thread Ricardo Rodríguez - Your XEN ICT Team
 hadley wickham[EMAIL PROTECTED] 31/12/2006 19:33 

Hi Ricardo,

You might want to have a look at the reshape package,
http://had.co.nz/reshape, which provides a more general and flexible
framework for reshaping data in R.

The version of warpbreaks I have doesn't have the replicate variable,
so unfortunately I can't provide you with example code for this case.
However, you should be able to figure it out for your data using the
documentation available on the website.

Thanks, Hadley,
 
My fault: I've not provided the line concerning replicate variable. It is 
included in ?xtabs:

warpbreaks$replicate - rep(1:9, len = 54)

It will be great to have an example with these given data. Anyway, I will have 
a look to reshape at the given site. Thanks a lot!

Cheers,

Ricardo




--
Ricardo Rodríguez
Your XEN ICT Team

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] barplot - how to force vertical axis to cover entire plot area

2006-12-11 Thread Ricardo Rodríguez - Your XEN ICT Team
Hi, Etienne,
 
I've seen this while working with barplot and never been able to understand the 
general rule, but by setting ylim high enough, I've always been able to draw a 
y axis covering the biggest values.
 
Could you send a data subset to reproduce the issue? Thanks.
 
Best,
 
Ricardo
 
--
Ricardo Rodríguez
Your XEN ICT Team

 Etienne[EMAIL PROTECTED] 7/12/2006 01:43 

I'm using barplot with the following call:
  
barplot(stat_data[[5]][,],axes=TRUE,axisnames=TRUE,axis.lty=1,xlab=xlab,ylab=ylab,beside=TRUE,las=1,font.lab=2,font.axis=1,legend.text=TRUE)

On some data, the vertical axis does not cover the
whole plot area and the last tick mark is smaller than
the maximum value.

I tried setting the ylim values but even with that,
some plots are still not OK, it just shrinks the
length of the bars.

Attached is a png example of the problem.  I hope it
gets through.

Thanks,
Etienne

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] axis in an image () plot

2006-11-26 Thread Ricardo Rodríguez - Your XEN ICT Team
 jim holtman[EMAIL PROTECTED] 24/11/2006 23:21 
If you data is a matrix, then try:

image(1:5, 1:14, data.rect)
text(row(data.rect), col(data.rect), data.rect)
 
Thanks, Jim. It works great and perfectly fill my requirements. I better 
understand now how text() works.
 
By the way, there is a line at the bottom of your message reading What is the 
problem you are trying to solve?, is this a kind of motto or are you asking me 
what I am trying to solve? :-) Thanks!
 
Cheers,
 
Ricardo

--
Ricardo Rodríguez
Your XEN ICT Team

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] axis in an image () plot

2006-11-26 Thread Ricardo Rodríguez - Your XEN ICT Team
 Jim Lemon[EMAIL PROTECTED] 26/11/2006 12:05 
Hi Ricardo,

This might be what you want (say your data frame is called my.df):

library(plotrix)
color2D.matplot(my.df,c(1,0),c(0,0),c(0,1))
text(rep(0.5:13.5,5),rep(seq(4.5,0.5,by=-1),14),
unlist(my.df),col=white)
and in fact it looks so neat that I might add it as an option.

Jim

Thanks, Jim! Once the original problem was solved by using image(), your 
plotrix() package is of major interest to keep improving this kind of graphics!
 
Thanks for your contribution,
 
Ricardo

--
Ricardo Rodríguez
Your XEN ICT Team

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] axis in an image() plot

2006-11-24 Thread Ricardo Rodríguez - Your XEN ICT Team
Hi all,

I've found quite usefull colored-grid created by image() but I'm facing a doubt 
I am not able to solve.

Given the following data rectangle...

 1  2  3  4  5  6  7  8  9 10 11 12 13 14
  1 12 22  0  7  2  1  0  2  0  2  6 -3  0  3
  2  0 -1  0  9  3 -4  0  0  0  0  3  0  0  0
  3 29 45  6 12 16 85 -2  0 -3 -4 89 -1 -1  1
  4  2  9  3  6 17  3 -2 -9 -2  8 -1  0  0  0
  5 44 16 -3 21 23  3  2  1  0 -2 13 18 -5  2

I am not able to draw x and y axis labeled 1 to 14 and 1 to 5 by 1. I've tried 
a number of options by using axis() to no avail.

It will be also very helpfull to be able to draw the value of each x,y 
combination within its position in the grid. Text() seems to be the answer, but 
I am not able yet to get the correct position for each label.

Please, could you point me in the right direction or offer some example?

Thank you in advance,

--
Ricardo Rodríguez
Your XEN ICT Team

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.