I've succeded in solving the problem that seems due to usage of show.
Both of the function i called had a show function enabled that seems to
confuse a bit the behaviour of matplotlib.
so I commented in both function show and only put it in the module that
called both function.
Not to
Sorry for the previsou post. Tweaking a bit I found that probably the
problem is not in the visualisation but in cleaning memory.
I use a function to make four plot calling two subfunction.
the plot are called plotrisp and plotlev in everyone of them any tome i
use a figure I also close it. But