[R] to draw a smooth arc
jim at bitwrit.com.au
Tue May 1 13:50:14 CEST 2007
Paulo Barata wrote:
> Dear R-list members,
> I would like to draw a smooth arc. I can draw an arc
> parametrically, but this produces an arc too coarse,
> even allowing for different increments in sequence t
> in the example below. Function "symbols" (graphics) does
> produce a smooth circle, but it cannot produce an arc.
> Please see the following example, drawing complete circles:
> ## draws circle with function symbols (package graphics)
> ## - inner circle is very smooth:
> ## draws circle parametrically - outer circle is too coarse:
> pi <- 4*atan(1)
> t <- seq(0,2*pi,0.02)
> Package "plotrix" has a function "draw.arc", but arcs produced
> with this function are also either too coarse or too polygonal,
> depending on the number of polygons used to approximate the arc.
> Is there a way to harness the characteristics of function
> "symbols" (graphics) to draw a smooth arc, not just a complete
I may be misunderstanding you, but have you tried to increase the number
of segments in the arc using the "n" argument?
More information about the R-help