# NOT RUN {
if(interactive()){
h <- l_hist(iris$Sepal.Length)
names(h)
h["xlabel"] <- "Sepal length"
h["showOutlines"] <- FALSE
h["yshows"]
h["yshows"] <- "density"
l_scaleto_plot(h)
h["showStackedColors"] <- TRUE
h['color'] <- iris$Species
h["showStackedColors"] <- FALSE
h["showOutlines"] <- TRUE
h["showGuides"] <- FALSE
# link another plot with the previous plot
h['linkingGroup'] <- "iris_data"
h2 <- with(iris, l_hist(Petal.Width,
linkingGroup="iris_data",
showStackedColors = TRUE))
# Get an R (grid) graphics plot of the current loon plot
plot(h)
# or with more control about grid parameters
grid.loon(h)
# or to save the grid data structure (grob) for later use
hg <- loonGrob(h)
}
# }
Run the code above in your browser using DataCamp Workspace