# NOT RUN {
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")
# }
Run the code above in your browser using DataLab