plotit {LSD} | R Documentation |
Plotting wrapper function to plot plots in printable quality and all kinds of formats
Description
Plotting wrapper function to save plots in R as "pdf", "ps", "jpeg", "png", "bmp" or "tiff".
Usage
plotit(
filename,
sw = 1,
sh = 1,
sres = 1,
plotsfkt,
ww = 7,
wh = 7,
pointsize = 12,
dev.pointsize = 8,
paper = "special",
quality = 100,
units = "px",
bg = "white",
fileformat = "jpeg",
saveit = FALSE,
notinR = FALSE,
addformat = NULL
)
Arguments
filename |
name of the plot to be saved with the format type suffix. |
sw |
scaling factor of weight. |
sh |
scaling factor of height. |
sres |
scaling factor of the resolution. |
plotsfkt |
list of plots to be plotted. |
ww |
width of window. |
wh |
height of window. |
pointsize |
the default pointsize of plotted text, interpreted as big points (1/72 inch) for plots to be saved. |
dev.pointsize |
pointsize of plotted text, interpreted as big points (1/72 inch) for display in R. |
paper |
needed only if filformat = "pdf" or "ps". |
quality |
needed only if filformat = "jpeg". |
units |
needed only if filformat = "jpeg", "png", "bmp" or "tiff". |
bg |
backgroundcolor. |
fileformat |
save the plot as "pdf", "ps", "jpeg", "png", "bmp" or "tiff". |
saveit |
should plot be saved. |
notinR |
should plot be not plotted in R. |
addformat |
should plot be saved additionally in another format ("pdf", "ps", "jpeg", "png", "bmp" or "tiff"). |
Author(s)
Bjoern Schwalb
See Also
Examples
data(homer)
plotsfkt = function(){
colpal = c("white","black","yellow","wheat3")
align(homer,colpal = colpal,main = "D'OH!",asp = 1,axes = FALSE)
}
# choose 'saveit = TRUE' for saving the plot in the specified fileformat #
# choose 'notinR = TRUE' to suppress plotting in R #
plotit("homer",sw = 2,sh = 2,sres = 2,plotsfkt,saveit = FALSE,notinR = FALSE,fileformat = "jpeg")
plotit("homer",sw = 2,sh = 2,sres = 2,plotsfkt,saveit = FALSE,notinR = FALSE,fileformat = "png")
plotit("homer",sw = 2,sh = 2,sres = 2,plotsfkt,saveit = FALSE,notinR = FALSE,fileformat = "bmp")
plotit("homer",sw = 2,sh = 2,sres = 2,plotsfkt,saveit = FALSE,notinR = FALSE,fileformat = "tiff")
plotit("homer",sw = 2,sh = 2,sres = 2,plotsfkt,saveit = FALSE,notinR = FALSE,fileformat = "ps")
plotit("homer",sw = 2,sh = 2,sres = 2,plotsfkt,saveit = FALSE,notinR = FALSE,fileformat = "pdf")