plot_crop: Crop a plot (remove the edges) using PDFCrop or ImageMagick

Description Usage Arguments Details Value References

View source: R/plot.R

Description

The command pdfcrop x x is executed on a PDF plot file, and convert x -trim x is executed for other types of plot files, where x is the plot filename.

Usage

1
plot_crop(x, quiet = TRUE)

Arguments

x

the plot filename

quiet

whether to suppress standard output from the command line utility

Details

The utility pdfcrop is often shipped with a LaTeX distribution, and convert is a command in ImageMagick (Windows users may have to put the bin path of ImageMagick into the PATH variable).

Value

The original filename.

References

PDFCrop: https://www.ctan.org/pkg/pdfcrop; the convert command in ImageMagick: http://www.imagemagick.org/script/convert.php


knitr documentation built on Aug. 10, 2017, 9:02 a.m.