5  Interactive Graphics

Interactive graphics offer a flexible and dynamic way to communicate information, great for websites / web applications and live demonstrations. rtemis uses the powerful plotly open source graphing library and other libraries built on top of that.
While viewing these graphs, try using the mouse to hover over and click to interact with the graphic elements - especially with the 3D plots.

5.1 Density and Histograms


To plot multiple traces, you can either pass a list, or define groups by passing a factor to the group argument. By default, mode = "overlap", which draws traces in the same plot.

dplot3_x(iris$Sepal.Length, group = iris$Species) 
options(rt.theme = "darkgrayigrid") # can also pass theme = "darkgrayigrid" to dplot3_x

Note that non-numeric columns are automatically omitted. You can set mode = "ridge" to create a multiplot:

dplot3_x(iris, mode = "ridge")

By default, “ridge” mode will order plot order by variable mean. This can be changed using the ridge.order.on.mean when you want to maintain group ordering - for example, if groups represent temporal information.

xl <- list(mango = rnorm(200, 7, 1),
           banana = rnorm(200,10, .8),
           tangerine = rnorm(400, 0, 2),
           sugar = rnorm(500, 3, 1.5))
dplot3_x(xl, mode = 'ridge')