jplot: Plotting routine in journal-style

Description Usage Arguments Value Examples

View source: R/plots.R

Description

Wrapper to ggplot with automated change to gray-scale coloring.

Usage

1
jplot(data = NULL, mapping = aes(), ..., environment = parent.frame())

Arguments

data

Default dataset used for plotting.

mapping

Default list of aesthetics.

...

Further arguments passed to ggplot.

environment

Alternative search space if a varaible is not found in data.

Value

Returns a masked ggplot object that is encoded as class "RGT_plot".

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
library(ggplot2)

df <- data.frame(x = 1:20,
                 y = 1:20,
                 z = as.factor(rep(1:4, each = 5)))

ggplot(df) +
  geom_line(aes(x = x, y = y, color = z))

jplot(df) +
  geom_line(aes(x = x, y = y, color = z))

ggplot(df) +
  geom_point(aes(x = x, y = y, color = z))

jplot(df) +
  geom_point(aes(x = x, y = y, color = z))

sfeuerriegel/ResearchGroupTools documentation built on May 29, 2019, 8:01 p.m.