https://github.com/cran/odfWeave
Tip revision: 218656fc529637e8c7af2ca47525a1fb7d137fd2 authored by Max Kuhn on 16 January 2014, 00:00:00 UTC
version 0.8.4
version 0.8.4
Tip revision: 218656f
adjustImageSize.R
adjustImageSize <- function(x, y, scale = 1, res = 96)
{
# x, y are width, height in inches
# res is image resolution
# scale is a scaling factor to easily adjust
# pch and text sizes
temp <- getImageDefs()
if(temp$device %in% c("bmp", "jpeg", "png", "CairoPNG", "CairoJPEG", "CairoTIFF"))
{
temp$plotHeight <- res * y * scale
temp$plotWidth <- res * x * scale
} else {
temp$plotHeight <- y * scale
temp$plotWidth <- x * scale
}
temp$dispHeight <- y
temp$dispWidth <- x
setImageDefs(temp)
rm(temp)
invisible()
}