Description Usage Arguments Value Examples
This function generates both png and pdf files for a given plot function.
1 2 3 |
plot.func |
Any plotting function. |
fprefix |
The output png and pdf file path prefix. The file names will be fprefix.date.png and fprefix.date.pdf (date: eg.20150331) |
width |
The width of the png and pdf file in inches. Defaults to 7. |
height |
The height of the png and pdf file in inches. Defaults to 7. |
pointsize |
The pointsize of the png and pdf files. |
add.date |
If this is true, the output file names will be fprefix.date.png and fprefix.date.pdf (date: eg.20150331). If this is false, they will be fprefix.png and fprefix.pdf. Defaults to TRUE. |
skip.png |
If this is true, only pdf file will be generated. Defaults to FALSE. |
nplots |
The number of plots to be included in one page of the png file, stacked vertically. This is useful when producing a multi-page pdf file, since png does not support multi-page plotting. Each plot in the pdf and png files will not look exactly the same, so it is generally recommended to produce a single-page pdf and png. If nplots is larger than 6, it may not be able to generate a png file. In that case, try lowering png.res (resolution). Defaults to 1. |
png.res |
The resolution of png. Defaults to 600. |
display.only |
If TRUE, display the plot on the screen, and not produce png or pdf. |
the returned value from plot.func will be returned.
1 2 3 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.