UnicodePlots.jl not working when running scripts from the command line

I’ve been running into some issues with UnicodePlots.jl and have isolated a test case:


When I run this script from the command line (I’ve tried PowerShell, windows cmd, and the integrated terminal in VSCode), nothing appears:
image
However, when I run it from a VSCode notebook or even from the Julia REPL inside the exact same terminal, it does work:

Does anyone have any idea why this might be happening?

I think you would have to call display on the plot object for it to be printed from a script, like this

p = lineplot(...)
display(p)

The REPL will always display the return value of an expression, unless you end the expression with “;”, whereas scripts only print if you ask them to with functions like display, show, println, and others.

2 Likes