-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,14 @@ | ||
Package: funcgeo | ||
Type: Package | ||
Title: Functional Geometry in R | ||
Version: 0.2.1 | ||
Version: 0.2.1.9000 | ||
Authors@R: person("Matthew", "Henderson", email = "[email protected]", | ||
role = c("aut", "cre")) | ||
Description: Peter Henderson's Functional Geometry in R. | ||
License: MIT + file LICENSE | ||
Imports: | ||
grid | ||
Encoding: UTF-8 | ||
RoxygenNote: 7.2.3 | ||
URL: https://github.com/mhenderson/funcgeo | ||
BugReports: https://github.com/mhenderson/funcgeo/issues |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,14 @@ | ||
#' Superimpose two pictures, one above the other. | ||
#' Superimpose two grobs, one above the other. | ||
#' | ||
#' @param p A picture | ||
#' @param q Another picture | ||
#' @param p A grob | ||
#' @param q Another grob | ||
#' @param m An integer | ||
#' @param n Another integer | ||
#' @return A picture | ||
#' @return A new grob obtained by superimposing p and q, one above the other. | ||
#' @export | ||
above <- function(p, q, m, n) { | ||
UseMethod("above") | ||
above <- function(p, q, m = 1, n = 1) { | ||
fg <- grid::frameGrob(layout = grid::grid.layout(2, 1)) | ||
fg <- grid::packGrob(fg, p, row = 1, height = grid::unit(m/(m + n), "npc")) | ||
fg <- grid::packGrob(fg, q, row = 2, height = grid::unit(n/(m + n), "npc")) | ||
return(fg) | ||
} |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,14 @@ | ||
#' Superimpose two grobs, side-by-side. | ||
#' Superimpose two grobs side-by-side. | ||
#' | ||
#' @param p grob | ||
#' @param q grob | ||
#' @param m An integer | ||
#' @param n Another integer | ||
#' @return A grob | ||
#' @return A picture | ||
#' @export | ||
beside <- function(p, q, m = 1, n = 1) { | ||
UseMethod("beside", p) | ||
fg <- grid::frameGrob(layout = grid::grid.layout(1, 2)) | ||
fg <- grid::packGrob(fg, p, col = 1, width = grid::unit(m/(m + n), "npc")) | ||
fg <- grid::packGrob(fg, q, col = 2, width = grid::unit(n/(m + n), "npc")) | ||
return(fg) | ||
} |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
#' Flip a picture. | ||
#' Flip a grob. | ||
#' | ||
#' @param g A picture | ||
#' @return Flipped picture | ||
#' @param g A grob | ||
#' @return Flipped grob | ||
#' @export | ||
flip <- function(g) { | ||
UseMethod("flip", g) | ||
grid::editGrob(g, x = grid::unit(1, "npc") - g$x) | ||
} |
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,11 @@ | ||
#' Rotate a picture. | ||
#' Rotate a grob. | ||
#' | ||
#' @param g A picture | ||
#' @param g A grob | ||
#' @param angle An angle | ||
#' @return Rotated picture | ||
#' @return Rotated grob | ||
#' @export | ||
rot <- function(g, angle) { | ||
UseMethod("rot", g) | ||
rot <- function(g, angle = 90) { | ||
grid::editGrob(g, vp = grid::viewport( | ||
angle = ifelse(is.null(g$vp$angle), angle, g$vp$angle + angle)) | ||
) | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
This file was deleted.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
This file was deleted.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
This file was deleted.
This file was deleted.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.