tests/testthat/test-draw_polygon.R

test_that("draw_polygon works", {
    set.seed(100)
    vals <- rnorm(100)
    x <- seq_along(vals)

    par(mgp = c(-2, -1, 0), mar = c(0, 0, 0, 0))
    draw_polygon(vals, x, type = "vertical", tck = 0.02, xlab = "", )
    draw_polygon(vals, x, type = "horizontal")
    expect_equal(2 * 2, 4)
})
kongdd/latticeGrob documentation built on March 30, 2024, 3:35 a.m.