Plots in the terminal (with sixel)

This is an old thread but if some desperate soul is still looking for a solution I want to share my accidental discovery:

How to plot inside iTerm on macOS

This produces sharp plots even on Retina displays. Adjust the size and scaling to your liking.

using Plots
theme(:dark)  # for dark terminal backgrounds
default(display_type=:inline, size=(1500,800), thickness_scaling=1.5)
plot(rand(20))
(Minor) caveats: - The GKS QT terminal starts in the background (it doesn't open a window). - You can even ssh into a headless remote machine and initiate the plot there. Some QT related error messages do appear though.

Set the the environment variable GKSwstype=nul before starting julia to suppress the launching of gksqt.

You can even ssh into a headless remote machine and initiate the plot there.

EDIT: How to avoid GKSQT. Thanks to Plots in the terminal (with sixel) - #31 by jheinen.

3 Likes