[R] Drawing curves
Greg Snow
Greg.Snow at imail.org
Mon Sep 15 18:48:13 CEST 2008
Depending on what you are trying to do, there may be other tools that will work better for you. For example xfig/jfig or Inkscape. You can create a plot, save it to a file, load it into one of those programs and add your curves/lines/arrows/etc.
Inside of R the 'lines' function draws lines and the 'arrows' function draws arrows. You can use the 'locator' function to find points on the graph by clicking, then pass those points to the drawing function (or use type='l' with locator to draw the line more directly). Curves are usually approximated by many short line segments (using 'lines') or you can use the 'xspline' function to draw curves (actually the line segments).
The 'symbols' function will put some types of symbols on a plot and the 'my.symbols' function in the TeachingDemos package will place user defined symbols on the plot.
Hope this helps, if not, give a little more detail and maybe we can be of more help,
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.snow at imail.org
(801) 408-8111
> -----Original Message-----
> From: r-help-bounces at r-project.org
> [mailto:r-help-bounces at r-project.org] On Behalf Of Allan Kamau
> Sent: Monday, September 15, 2008 9:21 AM
> To: r-help at r-project.org
> Subject: [R] Drawing curves
>
> Hi,
> Am looking for an R package that will provide the drawing of
> curves and arcs of arbitrary shapes to use in illustrations.
> For example bent lines and arrows.
>
> Allan.
>
> ______________________________________________
> 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