UnicodePlots multiple plots?

package
#1

I been having TONS of fun with UnicodePlots recently.

However, when I want to make two plots, one after the other, in a script, only the last is displayed in my REPL.
For example, with this code in a .jl file, I call include("/path/to/my/file.jl") in the REPL and only the barplot is displayed.

using UnicodePlots

boxplot(["apples", "oranges", "bananas"], [rand(20), rand(20), rand(20)])
barplot(["apples", "oranges", "bananas"], [sum(rand(20)), sum(rand(20)), sum(rand(20))])

I’m probably missing something really obvious here

0 Likes

#2

By default only the last value is displayed, but you can manually call display, e.g.

using UnicodePlots

plt1 = boxplot(["apples", "oranges", "bananas"], [rand(20), rand(20), rand(20)])
plt2 = barplot(["apples", "oranges", "bananas"], [sum(rand(20)), sum(rand(20)), sum(rand(20))])
display(plt1)
display(plt2)
1 Like