if(interactive()){
# Simple Example with Text Glyphs
p <- with(olive, l_plot(stearic, eicosenoic, color=Region))
g <- l_glyph_add_text(p, text=olive$Area, label="Area")
p['glyph'] <- g
if (FALSE) {
demo("l_glyphs", package="loon")
}
# create a plot that demonstrates the primitive glyphs and the text glyphs
p <- l_plot(x=1:15, y=rep(0,15), size=10, showLabels=FALSE)
text_glyph <- l_glyph_add_text(p, text=letters [1:15])
p['glyph'] <- c(
'circle', 'ocircle', 'ccircle',
'square', 'osquare' , 'csquare',
'triangle', 'otriangle', 'ctriangle',
'diamond', 'odiamond', 'cdiamond',
rep(text_glyph, 3)
)
}
Run the code above in your browser using DataLab