Learn R Programming

vchartr (version 0.1.4)

v_scale_size: Size scale for continuous data

Description

Size scale for continuous data

Usage

v_scale_size(
  vc,
  name = NULL,
  range = c(5, 30),
  ...,
  position = c("right", "bottom", "left", "top"),
  align = c("middle", "start", "end")
)

Value

A vchart()

htmlwidget object.

Arguments

vc

An htmlwidget created with vchart() or specific chart's type function.

name

Title for the legend.

range

Range of sizes for the points plotted.

...

Additional parameters for the legend.

position

Position of the legend.

align

Alignment of the legend.

Examples

Run this code
library(vchartr)
data("penguins", package = "palmerpenguins")

vchart(penguins) %>%
  v_scatter(aes(
    x = bill_length_mm, 
    y = bill_depth_mm,
    size = body_mass_g
  )) %>% 
  v_scale_size(
    name = "Body mass",
    range = c(1, 20)
  )

Run the code above in your browser using DataLab