Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

getFigCtr

Get coordinates in the figure region in user units.


Description

Calculates the coordinates of a proportional point of the figure region in user units.

Usage

getFigCtr(pos=c(0.5,0.5))

Arguments

pos

The proportion of the figure region to find (see Details).

Details

getFigCtr reads parameters about the current plot and calculates the vertical and horizontal centers of the figure region by default. This is typically useful for placing a centered title on plots where the left and right margins are very different.

By changing pos, any proportional points of the figure region can be returned. For example, pos=c(0,0) will return the left and bottom coordinates of the figure region.

Value

A two element vector containing the coordinates of the center of the figure region in user units.

Author(s)

Jim Lemon (thanks to Karl Brand for the adjustable coordinates)


plotrix

Various Plotting Functions

v3.8-1
GPL (>= 2)
Authors
Jim Lemon, Ben Bolker, Sander Oom, Eduardo Klein, Barry Rowlingson, Hadley Wickham, Anupam Tyagi, Olivier Eterradossi, Gabor Grothendieck, Michael Toews, John Kane, Rolf Turner, Carl Witthoft, Julian Stander, Thomas Petzoldt, Remko Duursma, Elisa Biancotto, Ofir Levy, Christophe Dutang, Peter Solymos, Robby Engelmann, Michael Hecker, Felix Steinbeck, Hans Borchers, Henrik Singmann, Ted Toal, Derek Ogle, Darshan Baral, Ulrike Groemping, Bill Venables
Initial release
2021-01-21

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.