png                   package:base                   R Documentation

_B_M_P, _J_P_E_G _a_n_d _P_N_G _g_r_a_p_h_i_c_s _d_e_v_i_c_e_s

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

     A graphics device for BMP, JPEG or PNG format bitmap files.

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

     bmp(filename="Rplot.bmp", width=480, height=480, pointsize=12)
     jpeg(filename="Rplot.jpg", width=480, height=480, pointsize=12, quality=75)
     png(filename="Rplot.png", width=480, height=480, pointsize=12)

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

filename: the name of the output file.

   width: the width of the device in pixels.

  height: the height of the device in pixels.

pointsize: the default pointsize of plotted text, intepreted at 72 dpi,
          so one point is approximately one pixel.

 quality: the `quality' of the JPEG image, as a percentage. Smaller
          values will give more compression but also more degradation
          of the image.

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

     Plots in PNG and JPEG format can easily be converted to many other
     bitmap formats, and both can be displayed in most modern web
     browsers. The PNG format is lossless and is best for line diagrams
     and blocks of solid colour. The JPEG format is lossy, but may be
     useful for image plots, for example. The BMP format is standard on
     Windows, and supported elsewhere.

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

     A plot device is opened: nothing is returned to the R interpreter.

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

     Guido Masarotto

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

     `Devices', `dev.print'

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

     ## copy current plot to a (large) PNG file
     dev.print(png, file="myplot.png", width=1024, height=768

