simonschoelly / SixelTerm.jl

Inline graphics in the REPL using Sixel

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SixelTerm

This is a quick-and-dirty Julia package to display graphics inline on terminals that support Sixel graphics. This is like TerminalExtensions but works with more terminals.

The main advantage of this approach is having usable graphics on remote connections without having to mess with X or other remote display connections. This works for Julia running on many remote platforms, including the Windows Subsystem for Linux (WSL). I've mainly been using WSLtty.

Terminals with Sixel support are available for Windows, Linux, MacOS, and Android. See here for one list.

Here is an example using Plots with the default GR backend:

ENV["GKSwstype"] = "nul"    # needed for the GR backend on headless servers
using Plots
using SixelTerm             
scatter(rand(100))

Note that when using it with Plots, you have to do using SixelTerm after using Plots. For some reason, Plots.jl adds its own display to the stack, so we need the SixelTerm display added last.

TerminalGraphics is another package that provides similar functionality. The main difference is that TerminalGraphics includes an interface to libsixel, and this package relies of ImageMagick for conversion to the Sixel format.

About

Inline graphics in the REPL using Sixel

License:MIT License


Languages

Language:Julia 100.0%