In an interactive session. It seems that the screenshot method, especially with nonlinear_subdivision > 1, eats the RAM. Unfortunately, we can't do much about it.
import felupe as fem
mesh = fem.Circle(n=12).add_midpoints_edges()
plotter = mesh.plot(off_screen=True)
img = plotter.screenshot()
import matplotlib.pyplot as plt
plt.imshow(img)
Even for such simple meshes and without nonlinear_subdivision > 1, only Restart Kernel helps to free the memory in an interactive Python session after multiple screenshot calls.
In an interactive session. It seems that the screenshot method, especially with
nonlinear_subdivision > 1
, eats the RAM. Unfortunately, we can't do much about it.Even for such simple meshes and without
nonlinear_subdivision > 1
, onlyRestart Kernel
helps to free the memory in an interactive Python session after multiple screenshot calls.