Files
markusro 5e37c1baa3
Build Debian Packages / build (bookworm, debian12) (push) Successful in 7m27s
Build Debian Packages / build (bullseye, debian11) (push) Successful in 7m2s
Build Debian Packages / build (trixie, debian13) (push) Successful in 8m49s
clean up tests and folders
2026-03-20 16:47:53 +01:00

24 lines
689 B
Python
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/usr/bin/env python3
import os
import sys
# 1) force GTK3 backend *before* pyplot is imported
os.environ['MPLBACKEND'] = 'GTK3Agg' # or GTK3Cairo
# 2) turn on every debug message GLib/GTK will give us
os.environ['G_MESSAGES_DEBUG'] = 'all'
os.environ['GTK_DEBUG'] = 'interactive' # also enables Ctrl-Shift-I inspector
import matplotlib
matplotlib.use('GTK3Agg') # belt-and-braces: make sure
import matplotlib.pyplot as plt
print('GTK3Agg backend loaded, creating figure…')
fig, ax = plt.subplots()
ax.plot([0, 1], [0, 1])
ax.set_title('GTK3-Matplotlib window close it to finish')
print('Showing figure…')
plt.show()
print('plt.show() returned script ends')