-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_window.py
More file actions
executable file
·26 lines (22 loc) · 836 Bytes
/
test_window.py
File metadata and controls
executable file
·26 lines (22 loc) · 836 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/usr/bin/env python3
"""Simple test to verify matplotlib window appears"""
import matplotlib
matplotlib.use('TkAgg')
import matplotlib.pyplot as plt
import numpy as np
print("Creating test window...")
fig, ax = plt.subplots(figsize=(10, 8), facecolor='black')
ax.set_facecolor('black')
ax.set_xlim(-1, 1)
ax.set_ylim(-1, 1)
ax.set_aspect('equal')
ax.axis('off')
# Draw a simple circle
circle = plt.Circle((0, 0), 0.5, color='blue', fill=False, linewidth=2)
ax.add_patch(circle)
ax.text(0, 0, 'TEST WINDOW', ha='center', va='center', color='white', fontsize=20)
ax.text(0, -0.7, 'If you see this, matplotlib works!', ha='center', va='center', color='yellow', fontsize=12)
plt.title('Matplotlib Test Window', color='white', pad=20)
print("Window should appear NOW. Close it when done.")
plt.show(block=True)
print("Window closed.")