1\name{HTMLplot} 2\alias{HTMLplot} 3 4\title{ Insert a graphic into an HTML output } 5\description{ 6 Exports the active graphic to a JPEG or GIF file and add it to a target HTML output, by writing the <IMG> tag. 7} 8\usage{ 9HTMLplot(Caption = "", file = HTMLGetFile(), append = TRUE, 10GraphDirectory = ".", GraphFileName = "", GraphSaveAs = "png", GraphBorder = 1, 11Align = "center", Width = 500, Height = 500, WidthHTML = NULL, HeightHTML = NULL, 12GraphPointSize = 12, GraphBackGround = "white", GraphRes = 72, plotFunction = NULL, ...) 13} 14 15\arguments{ 16 \item{Caption}{text to be placed below the graphic, as a caption} 17 \item{file}{ the target HTML file } 18 \item{append}{ logical. If 'TRUE' output will be appended to 'file'; otherwise, it will overwrite the contents of 'file'} 19 \item{GraphDirectory}{ path where file should be stored; ignore in a \code{HTMLStart}/\code{HTMLStop} session } 20 \item{GraphFileName}{ name of the file to produce (could be missing) } 21 \item{GraphSaveAs}{ an existing exportation device, such as jpg or gif } 22 \item{GraphBorder}{ HTML border option for the <IMG> tag } 23 \item{Align}{ HTML align option for the <IMG> tag} 24 \item{Width}{width of the image to create (passed to the driver)} 25 \item{Height}{height of the image to create (passed to the driver) (NULL: not specified)} 26 \item{WidthHTML}{ Width of the image in HTML} 27 \item{HeightHTML}{ Height of the image in HTML (NULL for not specified)} 28 \item{GraphPointSize}{ To be passed to the device creator function} 29 \item{GraphBackGround}{ To be passed to the device creator function} 30 \item{GraphRes}{ To be passed to the device creator function} 31 \item{plotFunction}{Function to be evaluated for the on-the-fly creation of the graph to be exported} 32 \item{\dots}{ ... } 33} 34\details{ 35Note that this function is coded to work automatically when using automatic exportation with \code{\link{HTMLStart}}. When using manualy, user should pay attention to the GraphDirectory option, so that graph files are in the same directory as HTML output files. When using to write reports in a non interactive way, first generate the graphic using a device and then use \code{\link{HTMLInsertGraph}}. 36} 37\value{ 38 no value returned. 39} 40 41\author{ Eric Lecoutre } 42 43\seealso{ \code{\link{HTMLStart}}, \code{\link{HTMLInsertGraph}}} 44 45\examples{ 46 47## Plots a graphic and insert it into the file /test.html. 48## Target file and also graph directory should be changed when submitting this code... 49 50myfile <- paste(tempfile(),".html",sep="") 51plot(sin, -pi, 2*pi,main="Sinus") 52# HTMLplot(file=myfile,GraphDirectory="/",Caption="Look at this curve!") 53} 54 55\keyword{ print } 56\keyword{ IO } 57\keyword{ file } 58 59