ly_hexbin: Add a "hexbin" layer to a Bokeh figure

Description Usage Arguments Examples

View source: R/layer_hexbin.R

Description

Add a "hexbin" layer to a Bokeh figure

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
ly_hexbin(
  fig,
  x,
  y = NULL,
  data = figure_data(fig),
  xbins = 30,
  shape = 1,
  xbnds = NULL,
  ybnds = NULL,
  style = "colorscale",
  trans = NULL,
  inv = NULL,
  lname = NULL,
  palette = "RdYlGn11",
  line = FALSE,
  alpha = 1,
  hover = TRUE
)

Arguments

fig

figure to modify

x

values or field name of center x coordinates to be binned

y

values or field name of center y coordinates to be binned

data

an optional data frame, providing the source for x and y

xbins, shape, xbnds, ybnds

parameters passed to hexbin

style

type of plotting for hexbins (see grid.hexagons) - "colorramp" and "lattice" are currently supported

trans, inv

transformation and inverse transformation function for the bin counts

lname

layer name

palette

name of color palette to use for color ramp (see here for acceptable values)

line

logical - should hexagons have an outline?

alpha

the alpha transparency of the hexagons between 0 (transparent) and 1 (opaque)

hover

logical - should a hover tool be added to show the count in each hexagon?

Examples

1
figure() %>% ly_hexbin(rnorm(10000), rnorm(10000))

rbokeh documentation built on Aug. 4, 2021, 1:06 a.m.