pngpdf_preset: Function that wraps pngpdf using a 'preset', to create a...

Description Usage Arguments Value Examples

Description

This function takes a list of plot functions that will be passed on to pngpdf, and draws each plot within its corresponding plt region specified by a preset object.

Usage

1
2
pngpdf_preset(plotfuncs, name, stylefunc = stylefunc0,
  preset = get_preset(length(plotfuncs)), ...)

Arguments

plotfuncs

List of plot functions.

name

The prefix of the output png or pdf file.

stylefunc

A style function that sets up graphic parameters.

preset

A preset object with the same number of plts as the number of plot functions.

...

Other parameters to be passed on to pngpdf()

Value

No particular return value

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
preset3a = get_preset(3)
pngpdf_preset( 
  list( 
      function(){barplot(1:4, names.arg=c('a','b','c','d'),ylab="some y",xlab="some x", col=COLOR4())},
      function(){plot(1:100,1:100,pch=19, type='o', xlab="")},
      function(){plot(rnorm(100),type='h')}
  ),
  'test5', stylefunc_blue, preset3a
)


preset1a = get_preset(1)
pngpdf_preset( 
  list( 
      function(){ barplot(1:5, names.arg=c('a','b','c','d','e'),ylab="some y",xlab="some x", col=COLOR5()) }
   ),
   'test6', stylefunc0, preset1a
)

SooLee/plotosaurus documentation built on May 9, 2019, 1:52 p.m.