mtext: gsplot mtext

View source: R/mtext.R

mtextR Documentation

gsplot mtext

Description

Allows text to be added to the plot margins. See mtext for more details.

Usage

mtext(object, ...)

Arguments

object

gsplot object

...

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

Details

Additional graphical parameter inputs:

  • text character string specifying the text to be placed in the margins

  • side numeric, specifies the side of the graph to place the text - bottom(1), left(2), top(3), or right(4)

  • line numeric, specifies the distance from the plot to place the text (in 'number of text lines')

See Also

mtext

Examples

gs <- gsplot()
gsNew <- points(gs, y=1, x=2, col="blue", pch=18, legend.name="Points")
gsNew <- lines(gsNew, c(3,4,3), c(2,4,6), legend.name="Lines", ylab="Data!")
gsNew <- text(gsNew, x=3.5, y=1.5, labels="Test") 
gsNew <- abline(gsNew, b=1, a=0, legend.name="1:1") 
gsNew <- legend(gsNew, location="topleft",title="Awesome!")
gsNew <- title(gsNew, main="Great Graph")
gsNew <- mtext(gsNew, text="More Stuff", side=2, line=3)
gsNew

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