tests/testthat/test-ppoints.R

context("ppolygon tests")

test <- FALSE

if (test) {
  setwd("~")
  pdf("test-ppoints.pdf")
  data(narccap)
  data(worldMapEnv, package = "maps")
  worldpoly <- maps::map("world", plot = FALSE)
  data(us.cities, package = "maps")
  cap <- us.cities[us.cities$capital == 2, ]
  cityxy <- list(x = cap$long, y = cap$lat)
  pimage(lon, lat, z = tasmax[, , 1], proj = "mercator", points = cityxy, 
    points.args = list(col = "orange", pch = 20))
  plines(worldpoly, proj = "mercator")
  pimage(lon, lat, z = tasmax[, , 1], proj = "mercator")
  ppoints(cityxy, proj = "mercator", col = "orange", pch = 20)
  plines(worldpoly, proj = "mercator")
  dev.off()
}

Try the autoimage package in your browser

Any scripts or data that you put into this service are public.

autoimage documentation built on March 16, 2021, 5:07 p.m.