CanvasXpress Julia Interface

Interactive plotting in Julia, IJulia, Pluto and VS Code with CanvasXpress

Getting started

CanvasXpress.jl is the first-party Julia binding for CanvasXpress. It is a thin JSON bridge: the charting engine is the same self-contained JavaScript bundle the browser runs, and Julia converts your tables and matrices, serializes the configuration, and emits the HTML. Charts render in IJulia/Jupyter, Pluto, VS Code, Documenter and standalone HTML files. The call shape mirrors the R package, so recipes port over directly.

# Install
using Pkg
Pkg.add("CanvasXpress")

Usage

Pass a matrix (rows are variables, columns are samples) or any Tables.jl source, plus optional sample and variable annotations, and every other keyword becomes a config parameter.

using CanvasXpress

data = [10 20 30 40;
        50 60 70 80;
        90 15 25 35]

p = canvasxpress(data;
                 vars = ["g1", "g2", "g3"],
                 smps = ["s1", "s2", "s3", "s4"],
                 smpAnnot = Dict("Treatment" => ["A", "B", "A", "B"]),
                 graphType = "Heatmap",
                 title = "Expression")

display(p)                  # IJulia / Pluto / VS Code / Documenter
savehtml(p, "chart.html")   # self-contained page
savefig(p, "chart.png")     # static PNG via the cxplot CLI

An exported canvasXpress alias is provided so R-style calls read the same in Julia, and cx_config_params() / validate = true give a searchable, validated view of every configuration parameter. Full documentation and source live in the CanvasXpress.jl repository.

⇧