Skip to contents

Slice out a smaller gp from a gp via coordinates

Usage

gp_excise(gp, top, left, bottom, right)

Arguments

gp

A gp

top, left, bottom, right

Integer. The coordinates of the corners. Remember that TOP left is (1, 1)

Value

A gp with top left coords = (1, 1)

Examples

gplate::example_plate |> as_gp() |> gp_excise(2, 2, 4, 4)
#> 
#>       3
#>    ______
#>   | ◯ ◯ ◯
#> 3 | ◯ ◯ ◯
#>   | ◯ ◯ ◯
#> 
#> 
#> Start corner: tl
#> Plate dimensions: 3 x 3