savePlot {grDevices} | R Documentation

## Save Windows Plot to a File

### Description

Saves the current plot on a `windows` device to a file.

### Usage

    savePlot(filename = "Rplot",
             type = c("wmf", "emf", "png", "jpeg", "jpg", "bmp",
                      "ps", "eps", "pdf"),
             device = dev.cur(),
             restoreConsole = TRUE)

### Arguments

`filename` | The filename under which to save the plot, without the extension.
`type` | The type of plot, Windows metafile, PNG, JPEG, BMP (Windows bitmap format), PostScript or PDF.
`device` | A device number of a `windows` device, by default the current device.
`restoreConsole` | See the Details section of `windows`.

### Details

This is equivalent to selecting the ‘Save as’ menu item on the ‘File’ menu of a `windows` device.

Using `filename` as `"clipboard"` or `""` with `type = "wmf"` will copy to the clipboard.

Types `"eps"` and `"ps"` are the same thing apart from the extension. Similarly `"wmf"`/`"emf"` and `"jpeg"`/`"jpg"`.

### Value

None, but a plot file will be created.

### See Also

`windows`, `dev.print`

[Package grDevices version 2.3.1 Index]