qsave: Save the plot to a file

Description Usage Arguments Value Author(s) References Examples

View source: R/utils.R

Description

This function saves a plot view to a image file like PNG or JPEG, etc.

Usage

1
qsave(filename = "Rplot.png", view, width = 480, height = 480)

Arguments

obj

the view object (usually returned by a plotting function)

filename

the file name (must have an explicit extension; see the references for supported image formats)

width

the desired width (pixels)

height

the desired height

Value

TRUE if the plot is successfully saved; otherwise FALSE

Author(s)

Yihui Xie

References

Supported image formats: http://doc.qt.nokia.com/latest/qimagewriter.html#supportedImageFormats

Examples

1
2
3
4
library(cranvas)
qtennis <- qdata(tennis)
v <- qbar(matches, data = qtennis)
qsave("tennis_bar.png", v, 480, 320)

ggobi/cranvas documentation built on May 17, 2019, 3:10 a.m.