Show PyPlot

I updated to Fedora 37 and it looks like PyCall can’t use python 3.11 so I did the ENV[“PYTHON”] = “” procedure, suggested by ufechner7 (PyPlot stopped working when upgrading to Fedora 37 - #2 by ufechner7) and it worked. Then I noticed that show() didn’t redisplay graphs. I don’t know if it’s related!

# at the bash terminal
using PyPlot

# try 1
plot( collect(1:100), rand(100) .^ 50 )
# close the figure manually
# I type show(): blank line

# try 2
x = plot( collect(1:100), rand(100) .^ 50 )
# close the figure manually
# I type show(), ans: blank line
# I type show(x), ans: PyCall.PyObject[PyObject <matplotlib.lines.Line2D object at 0x7f9f4eed92d0>]
# I type display(x), ans: 1-element Vector{PyObject}: \n PyObject <matplotlib.lines.Line2D object at 0x7f9f4eed92d0>

# try 3
x = figure()
plot( collect(1:100), rand(100) .^ 50 )
# close the figure manually
# I type display(x), show(x), show(), ans: almost the same, but no figure

# a curious fact (for me)
using Serialization

x = plot( collect(1:100), rand(100) .^ 50 )
data = (text="tests", img=x)
serialize("data.bin", data)
# close the figure manually
data = deserialize("data.bin")
# The figure is redisplayed, without any other command!