Arguments

doc

document object

fun

plot function. The function will be executed to produce graphics.
For grid or lattice or ggplot object, the function
should just be print and an extra argument x should specify the object
to plot. For traditionnal plots, the function should contain plot instructions. See examples.

pointsize

the default pointsize of plotted text in pixels, default to 12 pixels.

vector.graphic

logical scalar, if TRUE, vector graphics are
produced instead, PNG images if FALSE.

...

further arguments passed to or from other methods. See details.

width

plot width in inches (default value is 6).

height

plot height in inches (default value is 6).

fontname_serif, fontname_sans, fontname_mono, fontname_symbol

font
names for font faces. Use fonts available on operating system.

editable

bookmark

id of the Word bookmark to replace by the plot. optional.

bookmark is a character vector specifying bookmark id to replace by the plot(s).
If provided, plot(s) will replace the paragraph that contains the bookmark.
If not provided, plot(s) will be added at the end of the document.

par.properties

paragraph formatting properties of the paragraph that contains plot(s).
An object of class parProperties

bg

the initial background colour.

offx, offy

optional. x and y position of the shape (left top position of the bounding box) in inches. See details.

Details

Plot parameters are specified with the ... argument.
However, the most convenient usage is to wrap the plot code
into a function whose parameters will be specified as '...'.

If you want to add ggplot2 or lattice plot, use print function.

vector.graphic: DrawingML instructions will be produced
for docx and pptx objects.
Don't use vector graphics if document is a docx and MS Word version
used to open the document is 2007.

When document is a pptx object, two positioning methods are available.

If arguments offx, offy, width, height are missing, position and dimensions
will be defined by the width and height of the next available shape of the slide. This
dimensions can be defined in the layout of the PowerPoint template used to create
the pptx object.

If arguments offx, offy, width, height are provided, they become position and
dimensions of the new shape.