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.