theme_ptca2: A 'ggplot2' theme that matches the defaults of the factorial...

View source: R/theme_ptca.R

theme_ptca2R Documentation

A ggplot2 theme that matches the defaults of the factorial figures in the package PTCA4CATA

Description

theme_ptca2: A ggplot2 theme that matches the defaults of the factorial figures in PTCA4CATA. theme_ptca2 is, obviously, a (slightly smarter) cousin of PTCA4CATA::theme_ptca (which will be deprecated in the near future).

Usage

theme_ptca2(mire = TRUE, x0 = 0, y0 = 0, coor.fixed = TRUE, base_family = "")

Arguments

mire

(Default = TRUE) when TRUE plot the factorial axis at values x0 and y0.

x0

(Default = 0) the X-axis origin. Relevant only when mire = TRUE.

y0

(Default = 0) the Y-axis origin. Relevant only when mire = TRUE.

coor.fixed

(Default = TRUE), when TRUE the X and Y axis have the same units, when FALSE the units are set by ggplot2, if a number is provided it will give the aspect ratio (i.e., Y/X) to be used to plot the graph..

base_family

the font family for the text (e.g., on a mac 'Times', 'Arial', 'Courier', 'Symbol', or plain R, 'sans', 'serif', 'mono', can also be other fonts if installed). Default is "" (i.e., theme_ptca2 uses the current default font family).

Author(s)

Vincent Guillemot & Hervé Abdi

Examples

## Not run: 
x <- c(5, 8, 1, 70)
y <- c(10, 12, 20, 50)
( # parentheses are for print
 p <-  ggplot(as.data.frame(cbind(x, y)), aes(x = x, y = y)) +
           geom_point(size = 2, shape = 19) +
           theme_ptca2() 
           )

## End(Not run)

HerveAbdi/data4PCCAR documentation built on Sept. 11, 2022, 4:19 p.m.