View source: R/l_create_handle.R
l_create_handle | R Documentation |
This function can be used to create the loon object handles from a vector of the widget path name and the object ids (in the order of the parent-child relationships).
l_create_handle(target)
target |
loon object specification (e.g. |
loon's plot handles are useful to query and modify plot states via the command line.
For more information run: l_help("learn_R_intro.html#re-creating-object-handles")
l_getFromPath
if(interactive()){
# plot handle
p <- l_plot(x=1:3, y=1:3)
p_new <- l_create_handle(unclass(p))
p_new['showScales']
# glyph handle
gl <- l_glyph_add_text(p, text=LETTERS[1:3])
gl_new <- l_create_handle(c(as.vector(p), as.vector(gl)))
gl_new['text']
# layer handle
l <- l_layer_rectangle(p, x=c(1,3), y=c(1,3), color='yellow', index='end')
l_new <- l_create_handle(c(as.vector(p), as.vector(l)))
l_new['color']
# navigator handle
g <- l_graph(linegraph(completegraph(LETTERS[1:3])))
nav <- l_navigator_add(g)
nav_new <- l_create_handle(c(as.vector(g), as.vector(nav)))
nav_new['from']
# context handle
con <- l_context_add_context2d(nav)
con_new <- l_create_handle(c(as.vector(g), as.vector(nav), as.vector(con)))
con_new['separator']
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.