title: gsplot title

View source: R/title.R

titleR Documentation

gsplot title

Description

Adds a title to the plot. See title for more details.

Usage

title(object, ...)

Arguments

object

gsplot object

...

Further graphical parameters may also be supplied as arguments. See 'Details'.

Details

Additional graphical parameter inputs:

  • main character string that goes above the plot

  • sub character string that goes below the plot

  • col.main, col.sub color for the main title and subtitle, respectively

  • font.main, font.sub numeric value specifying the font style (1=normal, 2=bold, 3=italic, 4=bold and italic)

  • cex.main, cex.sub numeric value specifying the size of the main title and subtitle

See Also

title

Examples

gs <- gsplot() %>%
      points(y=1, x=2, col="blue", pch=18, legend.name="Points", xlab="Stuff") %>%
      lines(c(3,4,3), c(2,4,6), legend.name="Lines", ylab="Data!") %>%
      abline(b=1, a=0, legend.name="1:1") %>%
      legend(location="topleft",title="Awesome!") %>%
      title(main="Great Graph", col.main="grey", font.main=2, cex.main=2)
gs
gs <- gsplot() %>%
      points(y=1, x=2) %>%
      title(main="Great Graph")
gs

USGS-R/gsplot documentation built on April 17, 2023, 8:45 p.m.