dottodot               package:UsingR               R Documentation

_D_o_t-_t_o-_d_o_t _p_u_z_z_l_e

_D_e_s_c_r_i_p_t_i_o_n:

     A set of points to make a dot-to-dot puzzle

_U_s_a_g_e:

     data(dottodot)

_F_o_r_m_a_t:

     A data frame with 49 observations on the following 4 variables.

     _x x position

     _y y position

     _p_o_s where to put label

     _i_n_d number for label

_D_e_t_a_i_l_s:

     Points to make a dot to dot puzzle to illustrate, 'text',
     'points', and the argument 'pos'.

_S_o_u_r_c_e:

     Illustration by Noah Verzani.

_E_x_a_m_p_l_e_s:

     data(dottodot)
     # make a blank graph
     plot(y~x,data=dottodot,type="n",bty="n",xaxt="n",xlab="",yaxt="n",ylab="")
     # add the points
     points(y~x,data=dottodot)
     # add the labels using pos argument
     with(dottodot, text(x,y,labels=ind,pos=pos))
     # solve the puzzle
     lines(y~x, data=dottodot)

