Put your Vanilla code here
by hbyte » Mon Nov 25, 2024 2:45 am
- Code: Select all
import matplotlib.pyplot as plt
# Read data from file
with open('data.txt', 'r') as file:
data = file.read().splitlines()
# Convert data to integers or floats
data = [int(i) for i in data] # or use float(i) if your data contains decimals
# Plot the data
plt.plot(data, marker='o')
plt.title('Plot from File Data')
plt.xlabel('Index')
plt.ylabel('Value')
plt.show()
-
hbyte
- Site Admin
-
- Posts: 139
- Joined: Thu Aug 13, 2020 6:11 pm
Return to Python and ML
Who is online
Users browsing this forum: No registered users and 2 guests