[R] specify axis range

stephen sefick ssefick at gmail.com
Tue Aug 31 18:24:32 CEST 2010


If you would provide a reproducible example, even a dummy example, I
could give it a shot.  Otherwise look for something like "break".

On Tue, Aug 31, 2010 at 11:18 AM, Lathouri, Maria
<m.lathouri06 at imperial.ac.uk> wrote:
> Dear all,
>
> I want to make a plot where I can specify the range of y axis. I am using the interaction.plot command and because the values of y axis are from 2 to 500, I am using a logarithmic scale.
>
>>interaction.plot(speclong$Date,speclong$time2,speclong$outcome,xaxt="n",type="l",pch=20,xlab="", log="y", ylab="Concentration (ug/L)",trace.label="",col=rainbow(7))
>
>
>
> The plot itself gives me a y scale displaying ticks at 2, 5, 10, 20, 100, 200, 500. I would like to get a y scale where it would display ticks at every 4 marks, at 2, 20, 100 and 500.
>
>
>
> I tried ylim=c(2,20,100,500) but nothing happened. Actually I got an error.
>
>
>
> Could you help me?
>
>
>
> Thank you.
>
>
>
> Maria
>
>
>        [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org 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.
>



-- 
Stephen Sefick
____________________________________
| Auburn University                                   |
| Department of Biological Sciences           |
| 331 Funchess Hall                                  |
| Auburn, Alabama                                   |
| 36849                                                    |
|___________________________________|
| sas0025 at auburn.edu                             |
| http://www.auburn.edu/~sas0025             |
|___________________________________|

Let's not spend our time and resources thinking about things that are
so little or so large that all they really do for us is puff us up and
make us feel like gods.  We are mammals, and have not exhausted the
annoying little problems of being mammals.

                                -K. Mullis

"A big computer, a complex algorithm and a long time does not equal science."

                              -Robert Gentleman



More information about the R-help mailing list