ugd_id {unigd} | R Documentation |
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()
.
ugd_id(index = 0, limit = 1, which = dev.cur(), state = FALSE)
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: |
List containing static plot IDs.
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