Custom Icon Scatter

Authors

[Editor] Hu Zheng;

[Contributors]

Modified

2026-10-27

🤖 AI Skill — Download the Bizard unified skill for your AI assistant ⬇️ Download Skill ZIP
🔌 MCP Server — Let AI agents (Claude Code, Cursor, …) query Bizard live: claude mcp add bizard -- npx @openbiox/bizard-mcp — or the free hosted instance (no install, faster from mainland China): claude mcp add --transport http bizard http://biotree.top:38123/bizard-mcp/mcp 📖 MCP Docs
📖 Cite Bizard — if Bizard helps your research, please cite: Li, K., Zheng, H., Huang, K., et al. (2026). Bizard: A Community-Driven Platform for Accelerating and Enhancing Biomedical Data Visualization. iMetaMed, e70038. 🔗 DOI / BibTeX
Note

Hiplot website

This page is the tutorial for source code version of the Hiplot Custom Icon Scatter plugin. You can also use the Hiplot website to achieve no code ploting. For more information please see the following link:

https://hiplot.cn/basic/custom-icon-scatter?lang=en

A scatter plot with customizable icons.

Setup

  • System Requirements: Cross-platform (Linux/MacOS/Windows)

  • Programming language: R

  • Dependent packages: data.table; jsonlite; echarts4r; echarts4r.assets

# Install packages
if (!requireNamespace("data.table", quietly = TRUE)) {
  install.packages("data.table")
}
if (!requireNamespace("jsonlite", quietly = TRUE)) {
  install.packages("jsonlite")
}
if (!requireNamespace("echarts4r", quietly = TRUE)) {
  install.packages("echarts4r")
}
if (!requireNamespace("echarts4r.assets", quietly = TRUE)) {
  remotes::install_github("JohnCoene/echarts4r.assets")
}

# Load packages
library(data.table)
library(jsonlite)
library(echarts4r)
library(echarts4r.assets)
sessioninfo::session_info("attached")
─ Session info ───────────────────────────────────────────────────────────────
 setting  value
 version  R version 4.6.0 (2026-04-24)
 os       Ubuntu 24.04.4 LTS
 system   x86_64, linux-gnu
 ui       X11
 language (EN)
 collate  C.UTF-8
 ctype    C.UTF-8
 tz       UTC
 date     2026-05-09
 pandoc   3.1.3 @ /usr/bin/ (via rmarkdown)
 quarto   1.9.37 @ /usr/local/bin/quarto

─ Packages ───────────────────────────────────────────────────────────────────
 package          * version date (UTC) lib source
 data.table       * 1.18.4  2026-05-06 [1] RSPM
 echarts4r        * 0.5.0   2026-02-10 [1] RSPM
 echarts4r.assets * 0.0.1   2026-05-04 [1] Github (JohnCoene/echarts4r.assets@77b1fe0)
 jsonlite         * 2.0.0   2025-03-27 [1] RSPM

 [1] /home/runner/work/_temp/Library
 [2] /opt/R/4.6.0/lib/R/site-library
 [3] /opt/R/4.6.0/lib/R/library
 * ── Packages attached to the search path.

──────────────────────────────────────────────────────────────────────────────

Data Preparation

# Load data
data <- data.table::fread(jsonlite::read_json("https://hiplot.cn/ui/basic/custom-icon-scatter/data.json")$exampleData$textarea[[1]])
data <- as.data.frame(data)

# convert data structure
draw_data <- data.frame(
  x = data[["mpg"]],
  y = data[["wt"]],
  size = data[["qsec"]]
  )
rm(data)

# View data
head(draw_data)
     x     y  size
1 21.0 2.620 16.46
2 21.0 2.875 17.02
3 22.8 2.320 18.61
4 21.4 3.215 19.44
5 18.7 3.440 17.02
6 18.1 3.460 20.22

Visualization

# Custom Icon Scatter
p <- draw_data |>
  e_charts(x) |>
  e_scatter(
    y,
    size,
    symbol = ea_icons("warning"),
    name = "warning"
    )

p
Figure 1: Custom Icon Scatter