Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

bb_scatterplot

Helper for creating a scatter chart


Description

Helper for creating a scatter chart

Usage

bb_scatterplot(bb, data, mapping = NULL, ..., point_opacity = NULL)

Arguments

bb

A billboard htmlwidget object.

data

A data.frame

mapping

Mapping of variables on the chart, see bbaes.

...

Alternative mapping, you can specify x = "Sepal.Length" for example.

point_opacity

Opacity for points, value between [0,1].

Value

A billboard htmlwidget object.

Note

This function can be used with billboarderProxy in shiny application.

Examples

# Use first and second variable by default
billboarder() %>% 
  bb_scatterplot(data = iris)


# Explicit mapping
billboarder() %>% 
  bb_scatterplot(
    data = iris, 
    mapping = bbaes(Petal.Length, Petal.Width)
  ) %>% 
  bb_x_axis(tick = list(fit = FALSE))


# Grouping variable
billboarder() %>% 
  bb_scatterplot(
    data = iris, 
    mapping = bbaes(Sepal.Length, Sepal.Width, group = Species)
  )
  
# Size variable
billboarder() %>% 
  bb_scatterplot(
    data = iris, 
    mapping = bbaes(
      Sepal.Length, Sepal.Width,
      group = Species, size = Petal.Width
    )
  ) %>% 
  bb_x_axis(tick = list(fit = FALSE))

billboarder

Create Interactive Chart with the JavaScript 'Billboard' Library

v0.3.1
MIT + file LICENSE
Authors
Victor Perrier [aut, cre], Fanny Meyer [aut], NAVER Corp [cph] (billboard.js library), Mike Bostock [cph] (d3.format library)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.