tests/testthat/test-plot.updated_graph.R

test_that("plotting throws no error", {
  graph <- graph_create(
    c(pi / 10, 1 - pi / 10, 0, 0),
    rbind(
      c(0, .5, .5, 0),
      c(.5, 0, 0, .5),
      c(1e-5, 1 - 1e-5, 0, 0),
      c(1 - 1e-5, 1e-5, 0, 0)
    )
  )

  expect_no_error(
    plot(
      graph_update(graph, c(1, 4)),
      edge_curves = c("pairs" = .05, "H1|H3" = .25),
      precision = 6,
      vertex.size = 35,
      eps = 1e-4,
      background_color = "green",
      margins = 1:4 / 5
    )
  )
})

Try the graphicalMCP package in your browser

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

graphicalMCP documentation built on June 8, 2025, 11:19 a.m.