Skip to content
kohske edited this page May 25, 2012 · 1 revision

opts() list

This page presents the list of available options for fine tuning a ggplot2 graph object.

Axis Attributes

usage examples

  • axis.text.x (text)
  • axis.text.y (text)
  • axis.title.x (text)
  • axis.title.y (text)
  • axis.line (segment)
  • axis.ticks (segment)
  • axis.ticks.length (unit)
  • axis.ticks.margin (unit)

Legend Attributes

usage examples

  • legend.background (rect)
  • legend.key (rect)
  • legend.key.size (unit)
  • legend.key.width (unit)
  • legend.text (text)
  • legend.title (text)
  • legend.title.align (?)
  • legend.position (?)
  • legend.justification (?)
  • legend.direction (?)
  • legend.box (?)

Graph/Panel Attributes

usage examples

  • panel.background (rect)
  • panel.border (rect)
  • panel.margin (unit)
  • panel.grid.major (line)
  • panel.grid.minor (line)
  • plot.background (rect)
  • title (see plot.title)
  • plot.title (text)
  • plot.margin (unit)

Faceting Attributes

usage examples

  • strip.background (rect)
  • strip.text.x (text)
  • strip.text.y (text)

theme_text()

  • colour
  • size
  • angle
  • hjust
  • vjust
  • face = 'bold' 'ital'

theme_segment()

  • colour
  • size
  • linetype

theme_line()

  • colour
  • size
  • linetype

theme_rect()

  • colour
  • fill
  • size
  • linetype
Clone this wiki locally