ImageInTerminal with Plots integration in a sixel-enabled terminal works in Julia 1.8, not 1.9rc2

I was trying to use ImageInTerminal with Plots in a sixel-enabled terminal (eg, either mlterm or latest Konsole), I was surprised that, when all graphics correctly appeared inside the terminal with Julia 1.8, only image display, not Plots commands, apperaed in terminal with Julia 1.9. it seems that in 1.9 Plots does no longer recognize the Sixel enabled extension.

Reproducer :

using Images,TestImages,ImageInTerminal,Plots
testimage("mandril_color") # shows inside terminal in both 1.8 and 1.9
scatter(rand(10)) # shows inside terminal in 1.8, shows in separate GR windows in 1.9 (so doesnt shows when ssh without X11)

As I understand the difference is the in 1.9, Plots is using the ĂŚmageInTerminalExt` package extension. What could be the issue ? (and the solution !)


1 Like

Plots are rendered in a separate window by default.

julia> using Plots

julia> Plots.default(display_type=:inline)

julia> plot(sin, 0:0.1:2Ď€)


Tested with konsole 22.12.3, julia 1.9.2, Plots v1.39.0.

More options (size in particular) are available, e.g.

Thanks for the nice reply. However when using correctly ImageInTerminal in a Sixel-capable terminal the image gets (rightly) in the terminal, because no other graphics windows can be opened (eg on IPad, no desktop, no X11).

In fact, I found sometime earlier the reason ImageInTerminalExt does not work as an extension : code in the module to detect Sixel capability is run at compilation, not at execution, so cannot test the capability. In order to work it should be included in an init function. I cloned the repository and did this modification, and it then worked perfectly.

I should propose a PR, I know … may be some time later, in the between, sorry for the lapse - but lack of answers to my OP let me think not too many people use this functionality !