v_scale_size: Size scale for continuous data

View source: R/scales.R

v_scale_sizeR Documentation

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")
)

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.

Value

A vchart() htmlwidget object.

Examples

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)
  )

vchartr documentation built on April 12, 2025, 1:51 a.m.