[R] Plot documentation; Axis documentation

Marc Schwartz MSchwartz at MedAnalytics.com
Fri Jun 4 19:28:46 CEST 2004


On Fri, 2004-06-04 at 12:01, Glynn, Earl wrote:
> Why when I do a  "help(plot)" do I not see anything about parameters
> such as xlim or ylim?  As someone new to R, finding that xlim and ylim
> even existed wasn't all that easy. Even help.search("xlim") shows
> nothing once I know xlim exists.  
> 
> I'd like to change the default axes but "help(axis)" isn't that
> informative about changing the frequency of ticks on the axes.
> 
> Do people really refer to the x-axis as "1" and the y-axis as "2" as
> shown in help(axis)? 
> 
>    plot(1:4, rnorm(4), axes=FALSE)
>    axis(1, 1:4, LETTERS[1:4])
>    axis(2)
> 
> I hadn't a clue what the "1" and "2" meant here without reading
> additional documentation.  And where is the "LETTERS" constant defined
> and what else is defined there?
> 
> Are there no common R constants defined somewhere so the axes be defined
> symbolically?  Perhaps AXIS_X = 1, AXIS_Y = 2 would be better than just
> "1" and "2":
> 
>    plot(1:4, rnorm(4), axes=FALSE)
>    axis(AXIS_X, 1:4, LETTERS[1:4])
>    axis(AXIS_Y)
> 
> This would at least provide a clue about what is going on here.
> 
> Why is R such a graphics rich language and the documentation is so
> lacking in graphics examples?  Why can't the documentation include
> graphics too so one can study code and graphics at the same time?  How
> do I know the graphics I'm seeing is what it's supposed to look like?
> 
> I'd rather do more in R than MatLab but I find the R documentation
> somewhat lacking.  I prefer not to read the R source code to find the
> answers.
> 
> Thanks for any insight about this.
> 
> efg


Reading the posting guide, for which there is a link at the bottom of
each list e-mail, would be a good place to start. The section on
"Further Resources" provides important links.

Specifically on graphics:

1. Start by reading chapter 12 in An Introduction to R, which covers
graphics basics.

2. V&R's MASS also has an excellent chapter (4) on graphics.

3. There is also an article in R News "R Help Desk"
(http://cran.r-project.org/doc/Rnews/Rnews_2003-2.pdf) that would likely
be helpful as well.

Reviewing these resources would be crucial to assist your comprehension.
I think that you will find the documentation for R to be substantial, if
you take the time to properly research it. The posting guide will help
get you started in that endeavor.

In most cases this obviates any need to review source code, though a
critical advantage of R is the ability to do just that when you need to.

HTH,

Marc Schwartz




More information about the R-help mailing list