View source: R/savePlotInMultiFormats.R
savePlotInMultiFormats | R Documentation |
Saves Plot as jpg, pdf, svg, eps the latter two for Adobe Illustrator or freeware Inkscape
savePlotInMultiFormats( corefilename, plotecode, weite = 7, hoehe = 7, mymfrow = c(1, 1), saveSVG = T, savePDF = T, saveEPS = T, saveJPG = T, jpg_res = 300 )
corefilename |
filename (optional incl. path) without .*** file extension |
plotecode |
Any code used for plotting a graphic, as String |
weite |
width in inches, Default: 7 |
hoehe |
hight in inches, Default: 7 |
mymfrow |
mfrow parameter, relevant for base graphic only, Default: c(1, 1) |
saveSVG |
save as SVG, Default: T |
savePDF |
save as PDF, Default: T |
saveEPS |
save as EPS, Default: T |
saveJPG |
save as JPEG, Default: T |
jpg_res |
REsoluation of Jpec, Default: 300 |
DETAILS
Files in the specified location
## Not run: if(interactive()){ #EXAMPLE1 data(cars) savePlotInMultiFormats("Carsplot", "plot(cars$speed ~ cars$dist)") #EXAMPLE1 data(cars) require(ggplot2) p1 = ggplot(cars, aes(dist, speed)) + geom_point() savePlotInMultiFormats("Carsplot", 'plot(p1)') } ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.