# Convert a rectangleGate to a data.table useful for ggplot

Source: `R/fortify.R`
`fortify.rectangleGate.Rd`

For 2d rectangelGate, it is converted to a polygonGate first and then dispatch to the fortify method for polygonGate. for 1d, uses geom_vline/hline format.

    # S3 method for rectangleGate
    fortify(model, data = NULL, ...)

## Arguments

model | rectangleGate
data | data range used for polygon interpolation.
... | not used.

## Value

data.table

## Examples

    #2d rectangleGate
    rect.g <- rectangleGate(list("FSC-H" =  c(300,500), "SSC-H" = c(50,200)))
    fortify(rect.g)#>    FSC-H SSC-H
    #> 1:   300    50
    #> 2:   500    50
    #> 3:   500   200
    #> 4:   300   200
    #> 5:   300    50#1d gate
    rg <- rectangleGate(list("FSC-H" =  c(300,500)))
    fortify(rg)#>    FSC-H
    #> 1:   300
    #> 2:   500