axes3d                  package:rgl                  R Documentation

_D_r_a_w _b_o_x_e_s, _a_x_e_s _a_n_d _o_t_h_e_r _t_e_x_t _o_u_t_s_i_d_e _t_h_e _d_a_t_a

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

     These functions draw axes, boxes and text outside the range of the
     data. 'axes3d', 'box3d' and 'title3d' are the higher level
     functions;  normally the others need not be called directly by
     users.

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

     axes3d(edges = "bbox", labels = TRUE, tick = TRUE, nticks = 5, ...)
     box3d(...) 
     title3d(main = NULL, sub = NULL, xlab = NULL, ylab = NULL, 
         zlab = NULL, line = NA, ...) 
     axis3d(edge, at = NULL, labels = TRUE, tick = TRUE, line = 0, 
         pos = NULL, nticks = 5, ...) 
     mtext3d(text, edge, line = 0, at = NULL, pos = NA, ...) 

_A_r_g_u_m_e_n_t_s:

   edges: a code to describe which edge(s) of the box to use; see
          Details below 

  labels: whether to label the axes, or (for 'axis3d') the labels to
          use

    tick: whether to use tick marks 

  nticks: suggested number of ticks 

    main: the main title for the plot 

     sub: the subtitle for the plot 

xlab, ylab, zlab: the axis labels for the plot 

    line: the ``line'' of the plot margin to draw the label on 

edge, pos: the position at which to draw the axis or text 

    text: the text to draw 

      at: the value of a coordinate at which to draw the axis 

     ...: additional parameters which are passed to 'bbox3d' or
          'material3d' 

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

     The rectangular prism holding the 3D plot has 12 edges.  They are
     identified using 3 character strings.  The first character (`x',
     `y', or `z') selects  the direction of the axis.  The next two
     characters are each `-' or `+', selecting the lower or upper end
     of one of the other coordinates.  If only one or two characters
     are given, the remaining characters default to `-'.   For example
     'edge = 'x+'' draws an x-axis at the high level of y and the low
     level of z.

     By default, 'axes3d' uses the 'bbox3d' function to draw the axes. 
      The labels will move so that they do not obscure the data. 
     Alternatively, a vector of arguments as described above may be
     used, in which case fixed axes are drawn using 'axis3d'.

     If 'pos' is a numeric vector of length 3, 'edge' determines the
     direction of the axis and the tick marks, and the values of the
     other two coordinates in 'pos' determine the position.  See the
     examples.

_V_a_l_u_e:

     These functions are called for their side effects.  They return
     the object IDs of objects added to the scene.

_A_u_t_h_o_r(_s):

     Duncan Murdoch

_S_e_e _A_l_s_o:

     'axis', 'box', 'title', 'mtext', bbox3d

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

       open3d()
       points3d(rnorm(10),rnorm(10),rnorm(10), size=3)

       # First add standard axes
       axes3d()  

       # and one in the middle (the NA will be ignored, a number would 
       # do as well)
       axis3d('x',pos=c(NA, 0, 0))

       # add titles
       title3d('main','sub','xlab','ylab','zlab')

       rgl.bringtotop()
       
       open3d()
       points3d(rnorm(10),rnorm(10),rnorm(10), size=3)
       
       # Use fixed axes
       
       axes3d(c('x','y','z'))
              
       # Put 4 x-axes on the plot
       axes3d(c('x--','x-+','x+-','x++'))         
       
       axis3d('x',pos=c(NA, 0, 0))     
       title3d('main','sub','xlab','ylab','zlab')

