Amacım, farklı dosyalardan gelen verilerle 3D dağılımını çizmektir.Python dizgeyi float'a dönüştüremedi
Bu çalıştık:
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
import numpy as np
fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')
x = []
y = []
z = []
readfile = open('axeX.txt', 'r')
file = readfile.read().split('\n')
for plot in file:
x = plot.split(',')
x.append(x[0])
....
Not: bu hata var
9.0745818614959717e-01
1.1413983106613159e+01
1.7582545280456543e+00
: axeX.txt
gibi verileri içeren
ValueError: could not convert string to float:
dosyanızı okumak için 'np.genfromtxt' veya' np.loadtxt' kullanmayı deneyin. – tom
.txt dosyanızda kaç tane sütununuz var? – ThePredator
Lütfen en az bir örnek verin. x.append (şamandıra (x [0])) ValueError: dize dalgalanmaya dönüştürmek olabilir: –