This repository has been archived on 2025-10-24. You can view files and clone it, but cannot push or open issues or pull requests.
Files
MemMAPR-MKR/visual_mesh.py

26 lines
647 B
Python

import matplotlib.pyplot as plt
x_coords = []
y_coords = []
try:
filename = input("Input name: ")
with open(f'{filename}', 'r') as file:
lines = file.readlines()
for line in lines[2:]:
if line.strip():
x, y = map(float, line.strip().split())
x_coords.append(x)
y_coords.append(y)
plt.figure(figsize=(10, 6))
plt.scatter(x_coords, y_coords, s=10, c='blue', alpha=0.5)
plt.xlabel('X')
plt.ylabel('Y')
plt.grid(True)
plt.axis('equal')
plt.savefig(f"{filename[:-4]}.png")
plt.show()
except FileNotFoundError:
print(f"{filename} not found. ABORT!")