# Plots in the terminal (with sixel)

**URL:** <https://discourse.julialang.org/t/plots-in-the-terminal-with-sixel/22503>\
**Category:** Visualization\
**Tags:** plotting, repl\
**Created:** [March 29, 2019, 2:58pm UTC](https://discourse.julialang.org/t/plots-in-the-terminal-with-sixel/22503 "2019-03-29T14:58:45Z")\
**Posts on this page:** 1\
**Showing post:** 20

<div class="post-metadata">

**Author:** ![piechologist](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/piechologist/32/27662_2.png) [@piechologist](https://discourse.julialang.org/u/piechologist)\
**Post date:** [November 15, 2022, 9:48pm UTC](https://discourse.julialang.org/t/plots-in-the-terminal-with-sixel/22503/20 "2022-11-15T21:48:16Z")

</div>

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.

```julia
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](https://discourse.julialang.org/t/plots-in-the-terminal-with-sixel/22503/31).

---

_[View the full topic](https://discourse.julialang.org/t/plots-in-the-terminal-with-sixel/22503)._
