ggsavejj: A redefinition of the ggsave function to save all sorts of...

Description Usage Arguments Examples

View source: R/ggsavejj.r

Description

This function applies a simple publication-ready theme

Usage

1
2
3
4
ggsavejj(filename = default_name(plot), p = last_plot(), device = "jpg",
  dpi = 300, w = "onecol", h = par("din")[2], journal = NA, s = if
  (is.na(journal)) {     0.8 } else 1, idir = "../8-Img", bg = "solid",
  secondfile = T, ...)

Arguments

filename

File name, string without ending, e.g. 'myprettyplot'

p

plot object; defaults to the currently opened plot

device

Format (jpg, pdf, eps, etc); defaults to jpg

dpi

dpi of the plot; defaults to 300

w

defined the width of the figure in inch, either a number or a string equal to either "onecol" or "twocol"; defaults to "onecol"

h

defined the height of the figure in inch

journal

target journal; defaults to NA

s

scale of the plot; defaults to 0.8 if the journal is NA and 1 if the journal is specified

idir

directory to save the image in; defaults to "../8-Img"

bg

switch for transparent background, string either "solid" or "transparent"; defaults to "solid"

secondfile

saves a copy of the plot in another file in the same directory with the name "_myprettyplot", while the first file will add the current date at the end fo the filename ("myprettyplot_28Jan2016")

...

other parameters to be passed to ggsave()

Examples

1
graphicsjj

JanaJarecki/ggsavejj documentation built on May 7, 2019, 10:21 a.m.