pointsCircle             package:ecolitk             R Documentation

_F_u_n_c_t_i_o_n_s _t_o _p_l_o_t _c_i_r_c_u_l_a_r _r_e_l_a_t_e_d _f_i_g_u_r_e_s

_D_e_s_c_r_i_p_t_i_o_n:

     Functions to plot circular related figures

_U_s_a_g_e:

     linesCircle(radius, center.x = 0, center.y = 0, edges = 300, ...)
     polygonDisk(radius, center.x = 0, center.y = 0, edges=300,
     ...)
     arrowsArc(theta0, theta1, radius, center.x = 0, center.y = 0, edges = 10,
               length = 0.25, angle = 30, code = 2, ...)
     pointsArc(theta0, theta1, radius, center.x = 0, center.y = 0, ...)
     linesArc(theta0, theta1, radius, center.x = 0, center.y = 0, ...)
     polygonArc(theta0, theta1, radius.in, radius.out,
                center.x = 0, center.y = 0,
                edges = 10,
                col = "black",
                border = NA,
                ...)

_A_r_g_u_m_e_n_t_s:

theta0, theta1: start and end angles for the arc

  radius: radius of the circle 

radius.in: inner radius 

radius.out: outer radius 

center.x, center.y: Coordinates for the center of the circle (default
          to (0, 0))

   edges: number of edges the shape is made of 

     col: 

  border: border (see 'polygon')

length, angle, code: see the corresponding parameters for the function
          'arrows'

     ...: optional graphical paramaters

_D_e_t_a_i_l_s:

     Details to come... for now the best to run the examples and
     experiment by yourself...

_V_a_l_u_e:

     Function only used for their border effects.

_A_u_t_h_o_r(_s):

     laurent

_E_x_a_m_p_l_e_s:

     par(mfrow=c(2,2))
     n <- 10
     thetas <- rev(seq(0, 2 * pi, length=n))

     rhos <- rev(seq(1, n) / n)

     xy <- polar2xy(rhos, thetas)
     colo <- heat.colors(n)

     plot(0, 0, xlim=c(-2, 2), ylim=c(-2, 2), type="n")
     for (i in 1:n)
       linesCircle(rhos[i]/2, xy$x[i], xy$y[i])

     plot(0, 0, xlim=c(-2, 2), ylim=c(-2, 2), type="n")
     for (i in 1:n)
       polygonDisk(rhos[i]/2, xy$x[i], xy$y[i], col=colo[i])

     plot(0, 0, xlim=c(-2, 2), ylim=c(-2, 2), type="n", xlab="", ylab="")
     for (i in 1:n)
       polygonArc(0, thetas[i],
                  rhos[i]/2, rhos[i],
                  center.x = xy$x[i], center.y = xy$y[i], col=colo[i])

     plot(0, 0, xlim=c(-2, 2), ylim=c(-2, 2), type="n", xlab="", ylab="")
     for (i in (1:n)[-1]) {
       linesCircle(rhos[i-1], col="gray", lty=2)
       polygonArc(thetas[i-1], thetas[i],
                  rhos[i-1], rhos[i], col=colo[i],
                  edges=20)
       arrowsArc(thetas[i-1], thetas[i],
                  rhos[i] + 1, col=colo[i],
                  edges=20)
     }
       

