Description Usage Arguments Value Author(s) See Also Examples
Automatically cropping of PNG, JPG, etc image files using the convert
comand line tool (http://www.imagemagick.org/) .
1 |
fileName |
character string denoting the path/ name of the input file |
outFileName |
character string denoting the name of the output file. If
not specified, "_cr.[original file format]" is appended to |
Returns nothing, but as a side effect saves the cropped image file.
Christoph Schmidt <schmidtchristoph@users.noreply.github.com>
knitr plot_crop
, ImageMagick
http://www.imagemagick.org/
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | library(networkD3)
data(MisLinks)
data(MisNodes)
p <- forceNetwork(Links = MisLinks, Nodes = MisNodes,
Source = "source", Target = "target",
Value = "value", NodeID = "name",
Group = "group", opacity = 0.9,
height = 900, width = 900)
# generated PNG needs a serious cropping
jsGraphic2Png(p, c(900, 900, 20, 20), slow = TRUE)
imagecrop("JSgraphic.png", "JSgraphicCr1.png")
# generated PNG needs a serious cropping
jsGraphic2Png(p, c(900, 900, 20, 20), slow = FALSE)
imagecrop("JSgraphic.png")
file.remove(c("JSgraphic.png", "JSgraphicCr1.png", "JSgraphic_cr.png"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.