ggraphics              package:gWidgets              R Documentation

_C_o_n_s_t_r_u_c_t_o_r _f_o_r _a _t_o_o_l_k_i_t _s_p_e_c_i_f_i_c _p_l_o_t _d_e_v_i_c_e _a_n_d _a
_n_o_t_e_b_o_o_k _t_o _w_r_a_p _p_l_o_t_s _i_n

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

     If a toolkit provides a graphics device, such as the cairoDevice
     package does for GTK, this constructor makes devices that can then
     be embedded in other widgets. The notebook interface is one such
     example.

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

     ggraphics(width = dpi * 6, height = dpi * 6, dpi = 75, ps = 12, container =
     NULL, ..., toolkit = guiToolkit())

     ggraphicsnotebook(width=dpi*6, height=dpi*6,dpi=75, container = NULL,..., toolkit = guiToolkit()) 

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

   width: width in pixels of device

  height: height in pixels of device

     dpi: scale factor for default width and height

      ps: pointsize

container: Optional container to attach widget to

     ...: for notebook, passed onto 'gnotebook' call.

 toolkit: Which GUI toolkit to use

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

     When multiple graphics devices are present, clicking in the window
     of one will make that the current device  

     The 'visible<-' method makes the object the current device.

     The 'svalue(obj, ..., value)' method will save the visible window
     to the file in 'value'. In gWidgetsRGtk2, if the window has
     another window clipping part of it, this clipping will be shown.
     This "hack" is needed, as 'dev.copy' does not currently work for
     the "cairo" graphic device. (In future versions, there will be
     support for pdf files within cairo.)

     The 'addhandlerclicked(obj, handler, action, ...)' method where
     handler has first argument 'h' has the additional values 'h\$x'
     and 'h\$y' where these are values are returned using "usr"
     coordinates (see 'help("par")'). (This was in NDC coordinates)

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

     ## Not run: 
     win = gwindow("Graphics example")
     ggraphics(ps=6, container=win)
     hist(rnorm(100))
     ## End(Not run)

