[R] r graphing

R. Michael Weylandt michael.weylandt at gmail.com
Wed Apr 11 23:37:46 CEST 2012


The easiest way is to just use ?curve (type ?curve at the prompt to
get documentation for curve): e.g., curve(x^3, from = -5, to = 5)

You could also build the plot yourself like:

x <- seq(-5, 5, length.out = 200)
y <- x^3

plot(x,y)

Michael

On Wed, Apr 11, 2012 at 4:41 PM, John Kim <ktown4989 at gmail.com> wrote:
> can anybody tell me how i can draw x- y- axis and draw x^3 graph using
> R graph??
>
> i need nice coordinate system with legends and coordinate
> numberings..
>
> and nice graph of x^3 on it..  it will be nice if you tell me how i
> can center the graph..
>
> i want the origin (0,0) to be right in the middle of the graph.
>
> thank you so much.
>
> ______________________________________________
> 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.



More information about the R-help mailing list