dev2bitmap             package:grDevices             R Documentation

_G_r_a_p_h_i_c_s _D_e_v_i_c_e _f_o_r _B_i_t_m_a_p _F_i_l_e_s _v_i_a _G_h_o_s_t_S_c_r_i_p_t

_D_e_s_c_r_i_p_t_i_o_n:

     'bitmap' generates a graphics file. 'dev2bitmap' copies the
     current graphics device to a file in a graphics format.

_U_s_a_g_e:

     bitmap(file, type = "png256", height = 6, width = 6, res = 72,
            pointsize, ...)

     dev2bitmap(file, type = "png256", height = 6, width = 6, res = 72,
                pointsize, ...)

_A_r_g_u_m_e_n_t_s:

    file: The output file name, with an appropriate extension.

    type: The type of bitmap. the default is '"png256"'.

  height: The plot height, in inches.

   width: The plot width, in inches.

     res: Resolution, in dots per inch.

pointsize: The pointsize to be used for text: defaults to something
          reasonable given the width and height

     ...: Other parameters passed to 'postscript'.

_D_e_t_a_i_l_s:

     'dev2bitmap' works by copying the current device to a 'postscript'
     device, and post-processing the output file using 'ghostscript'. 
     'bitmap' works in the same way using a 'postscript' device and
     postprocessing the output as "printing".

     You will need a version of 'ghostscript' (5.10 and later have been
     tested): the full path to the executable can be set by the
     environment variable 'R_GSCMD'. (If this is unset the command
     '"gs"' is used.)

     The types available will depend on the version of 'ghostscript',
     but are likely to include '"pcxmono"', '"pcxgray"', '"pcx16"',
     '"pcx256"', '"pcx24b"', '"pcxcmyk"', '"pbm"', '"pbmraw"', '"pgm"',
     '"pgmraw"', '"pgnm"', '"pgnmraw"', '"pnm"', '"pnmraw"', '"ppm"',
     '"ppmraw"', '"pkm"', '"pkmraw"', '"tiffcrle"', '"tiffg3"',
     '"tiffg32d"', '"tiffg4"', '"tifflzw"', '"tiffpack"', '"tiff12nc"',
     '"tiff24nc"', '"psmono"', '"psgray"', '"psrgb"', '"bit"',
     '"bitrgb"', '"bitcmyk"', '"pngmono"', '"pnggray"', '"png16"',
     '"png256"', '"png16m"', '"jpeg"', '"jpeggray"', '"pdfwrite"'.

     Note: despite the name of the functions they can produce PDF _via_
     'type = "pdfwrite"', and the PDF produced is not bitmapped.

     For formats which contain a single image, a file specification
     like 'Rplots%03d.png' can be used: this is interpreted by
     GhostScript.

     For 'dev2bitmap' if just one of 'width' and 'height' is specified,
     the other is chosen to preserve aspect ratio of the device being
     copied.

_V_a_l_u_e:

     None.

_S_e_e _A_l_s_o:

     'postscript', 'png' and 'jpeg' and on Windows 'bmp'.

     'pdf' generate PDF directly.

     To display an array of data, see 'image'.

