Learn R Programming

httpgd (version 1.3.1)

hgd_id: Query httpgd plot IDs

Description

Query httpgd 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 hgd().

Usage

hgd_id(index = 0, limit = 1, which = dev.cur(), state = FALSE)

Value

a list contains plot IDs.

Arguments

index

Plot index. If this is set to 0, the last page will be selected.

limit

Limit the number of returned IDs. If this is set to a value > 1 the returned type is a list if IDs.

which

Which device (ID).

state

Include the current device state in the returned result (see also: hgd_state()).

Examples

Run this code
hgd()

plot.new()
text(.5, .5, "#1")
plot.new()
text(.5, .5, "#2")
plot.new()
text(.5, .5, "#3")
hgd_id() # The last one
hgd_id(2) # The second one
hgd_id(1, limit = Inf) # The first one and all the followings

dev.off()

Run the code above in your browser using DataLab