[R] Plot help

Jim Lemon drjimlemon at gmail.com
Wed Mar 16 22:48:32 CET 2016


Hi Andre,
Try this:

plot(x= Index, y=Values, ylim= c(-16,16), pch= 19,
 col = "blue",yaxt="n")
points (Log, pch = 19, col="green")
axis(2,at=seq(-16,16,by=4))

Jim

On Thu, Mar 17, 2016 at 8:32 AM, André Luis Neves <andrluis at ualberta.ca> wrote:
> Dear all:
>
>
> I was wondering how I modify the plot command below so that the y-axis
> displays the numbers in a 4 by 4 scale.
>
>
> It looks like the plot generated by the commands below shows the y-axis in
> a 5 by 5 scale:
>
>
> Values <- c(1/16, 1/8, 1/4, 1/2, 1, 2, 4, 8, 16)
>
> Values
>
> Log <- log2(Values)
>
> Log
>
> Index <- c(1:9)
>
> Index
>
> ##2) Plot
>
> plot (x= Index, y=Values, ylim= c(-16,16), pch= 19, col = "blue")
>
> points (Log, pch = 19, col="green")
>
>
> Thanks.
>
>
> Andre
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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.



More information about the R-help mailing list