Kiosk Mode execute loaded code

When starting via the python script via an entry in bashrc, there is no such thing as graphics naturally.
But if I start the console in the GUI, it works. At least for some time and then it freezes after some GTK operation.
What is the recommended way to run a Raspberry Pi based kiosk with a loaded python script using matplotlib- matplotlib may be included in the calling code before executing the loaded python code?

Does Usage Guide — Matplotlib 3.3.3 documentation help? matplotlib.use('Agg') should make it so you do not require graphics, but can still save plots using savefig.

I may confirm that the freezing has stopped after updating to the last matplotlib version. Thanks for the tip. However I’m still interested in a solution showing the figures after repowering the rapsberry PI without manual action, e.g. after power failure. But this is not a matplotlib issue.I will try to investigate the upstart method.