ln: Natural Log

lnR Documentation

Natural Log

Description

The ln scale maps data values to a visual property through a natural logarithm transformation.

Function Name

  • ln

Arguments

  • The name of an aesthetic to scale (required).

Examples

library(duckdb)
con <- dbConnect(duckdb())
dbWriteTable(con, "cars", cars)

dbGetPlot(con, "
  visualize
    horsepower as x,
    miles_per_gallon as y
  from cars
  using points
  scale by
    ln(x),
    ln(y)
")


rsgl documentation built on June 9, 2026, 1:07 a.m.