File: create-figures.R

package info (click to toggle)
r-cran-eaf 2.5.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,028 kB
  • sloc: ansic: 7,281; perl: 848; makefile: 73; sh: 43; python: 27
file content (17 lines) | stat: -rw-r--r-- 930 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
library(eaf)
extdata_dir <- system.file(package="eaf", "extdata")
A1 <- read_datasets(file.path(extdata_dir, "ALG_1_dat.xz"))
A2 <- read_datasets(file.path(extdata_dir, "ALG_2_dat.xz"))
# FIXME: How to crop PNG?
png(filename = "man/figures/ALG_1_dat-ALG_2_dat.png", width = 480, height = 240)
eafdiffplot(A1, A2, type = "point", title.left = "Algorithm 1", title.right = "Algorithm 2")
invisible(dev.off())

a1 <- read_datasets(file.path(extdata_dir, "wrots_l100w10_dat"))
a2 <- read_datasets(file.path(extdata_dir, "wrots_l10w100_dat"))
# FIXME: How to crop PNG?
png(filename = "man/figures/eafdiff-color.png", width = 600, height = 350)
eafdiffplot(a1, a2, col = colorRampPalette(c("blue", "red")), intervals = 10,
            title.left = expression("W-RoTS, " * lambda * "=" * 100 * ", " * omega * "=" * 10),
            title.right= expression("W-RoTS, " * lambda * "=" * 10 * ", " * omega * "=" * 100))
invisible(dev.off())