Access status information of a unigd graphics device.
This function will only work after starting a device with ugd()
.
Arguments
- which
Which device (ID).
Value
List of status variables with the following named items:
$hsize
: Plot history size (how many plots are accessible),
$upid
: Update ID (changes when the device has received new information),
$active
: Is the device the currently activated device.
Examples
ugd()
ugd_state()
#> $hsize
#> [1] 0
#>
#> $upid
#> [1] 0
#>
#> $active
#> [1] TRUE
#>
#> $client
#> NULL
#>
plot(1, 1)
ugd_state()
#> $hsize
#> [1] 1
#>
#> $upid
#> [1] 5
#>
#> $active
#> [1] TRUE
#>
#> $client
#> NULL
#>
dev.off()
#> agg_png
#> 2