gghilbertplot: Function to create the Hilbert Plot

Description Usage Arguments Value Examples

View source: R/gghilbert.R

Description

Function to create the Hilbert Plot

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
gghilbertplot(
  df,
  idcol,
  color = NULL,
  size = NULL,
  label = NULL,
  alpha = 1,
  add_curve = FALSE,
  curve_alpha = 1,
  curve_color = "black",
  jitter = 0
)

Arguments

df

Data frame to generate plot from

idcol

The column name to be used for mapping (gghid)

color

The column to map to color

size

The column to map to size

label

The column that contains the label

alpha

The amount of alpha blending for the individual points

add_curve

Whether or not to add the underlying hilbert curve

curve_alpha

The amount of alpha blending for the hilbert curve

curve_color

The color of the hilbert curve

jitter

The amount of jitter to add to prevent overplotting

Value

a ggplot object

Examples

1
2
tibble::tibble(val = 1:128, size = runif(128, 1, 5), color = rep(c(1,2,3,4),32)) %>%
        gghilbertplot(val, color = factor(color), size = size, add_curve = TRUE)

gghilbertstrings documentation built on April 7, 2021, 9:07 a.m.