embedFig: Generate a figure bitmap file with embedded metadata

Description Usage Arguments Details Value Author(s) See Also

Description

The function calls a plotting function, and writes to a user-defined bitmap file, including the full metadata description provided by the user. This information is a compressed JSON representation.

Usage

1
embedFig(plot.fun, arg.list, full.metadata, format = "png", filename, ...)

Arguments

plot.fun

Character. Name of the plotting function

arg.list

List of arguments passed to the plotting function. The list is functional, and not merely descriptive, so all arguments (including required input grids) need to be passed here.

full.metadata

An igraph-class containing the RDF graph with the full metadata structure.

format

Format of the bitmap file. Currently only the "png" option is available

filename

The name of the output file.

...

further optional arguments passed to png (width, height etc.)

Details

The function performs the following steps:

  1. Write the output figure in a temporary file

  2. Serialize the RDF graph into json and write it into a temporary file

  3. Read the temporary json file and compress (gzip)

  4. Read the temporary image file, and re-write into the destination file (as given in filename), appending the compressed metadata

Value

A temporary file of the specified format

Author(s)

J. Bedia

See Also

Other graphical.outputs: graph2json


Predictia/metaclipR documentation built on May 14, 2019, 6:07 a.m.