ugd_id {unigd} | R Documentation |
Query unigd plot IDs
Description
Query unigd graphics device static plot IDs.
Available plot IDs starting from index
will be returned.
limit
specifies the number of plots.
This function will only work after starting a device with ugd()
.
Usage
ugd_id(index = 0, limit = 1, which = dev.cur(), state = FALSE)
Arguments
index |
Plot index. If this is set to |
limit |
Limit the number of returned IDs. If this is set to a
value > 1 the returned type is a list if IDs. Set to |
which |
Which device (ID). |
state |
Include the current device state in the returned result
(see also: |
Value
List containing static plot IDs.
Examples
ugd() # Initialize graphics device
# Page 1
plot.new()
text(.5, .5, "#1")
# Page 2
plot.new()
text(.5, .5, "#2")
# Page 3
plot.new()
text(.5, .5, "#3")
third <- ugd_id() # Get ID of page 3 (last page)
second <- ugd_id(2) # Get ID of page 2
all <- ugd_id(1, limit = Inf) # Get all IDs
ugd_remove(1) # Remove page 1
ugd_render(second) # Render page 2
dev.off() # Close device
[Package unigd version 0.1.2 Index]