In an echarts4r scatter plot, is it possible to add horizontal jitter with a discrete x axis?
library(echarts4r)
library(tidyverse)
df <- tibble(x = c("a", "a", "b", "b", "c", "c"),
y = c(1, 2, 3, 3, 4, 5),
z = c(1, 2, 3, 3, 4, 5))
df |>
e_charts(x) |>
e_scatter(y, symbol_size = 15) |>
e_scatter(z, symbol_size = 15, symbol="diamond", jitter_amount = 1) |>
e_color(
c("red", "blue")
)
The jitter option adds vertical jitter (blue diamonds) instead of the desired horizontal jitter.