Learn R Programming

xdvir (version 0.1-2)

element_latex: ggplot2 Theme Element Supporting Latex Syntax

Description

This theme element is an alternative to ggplot2::element_text() for producing labels from LaTeX fragments.

Both hjust and vjust can be character values: one of "left", "bbleft", "centre", "center", "right", "bbright" for horizontal justification; and one of "bottom", "baseline", "centre", "center", or "top" for vertical justification.

Usage

element_latex(family=NULL,
              fontface=NULL,
              colour=NULL,
              size=NULL,
              hjust=NULL, vjust=NULL,
              angle=NULL,
              lineheight=NULL,
              color=NULL,
              margin=NULL,
              width=NULL,
              packages=NULL,
              engine=getOption("xdvir.engine"),
              rotate_margins=FALSE,
              inherit.blank=FALSE)

Value

An element_latex object that can be used in place of element_text in ggplot2 theme specifications

Arguments

family

The default font family.

fontface

The default font face.

colour, color

The default text colour.

size

The deafult font size.

hjust

Horizontal justification. Typically in \([0, 1]\), but see Details.)

vjust

Vertical justification. Typically in \([0, 1]\), but see Details.)

angle

Angle (in \([0, 360]\))

lineheight

The deafult lineheight.

margin

The margin around the text.

width

Either NA or a numeric value or a unit specifying the width for typesetting. NA means the natural width of the label.

packages

The LaTeX packages to be used. May be the name of a LaTeX package (character) or a "LaTeXpackage" object.

engine

The TeX engine that should be used to render the LaTeX. May be the name of a TeX engine (character) or a "TeXengine" object.

rotate_margins

Whether margins should follow the orientation of the text.

inherit.blank

Should this element inherit the existence of an element_blank among its parents? If TRUE the existence of a blank element among its parents will cause this element to be blank as well. If FALSE any blank parent element will be ignored when calculating final element state.