Python - Como puedo arreglar mis graficas - IndexError: too many indices for array

 
Vista:

Como puedo arreglar mis graficas - IndexError: too many indices for array

Publicado por FV (2 intervenciones) el 21/03/2021 21:45:13
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
H=np.genfromtxt('VIC_HDZ.txt', usecols=2, skip_header=1)
 
D=np.genfromtxt('VIC_HDZ.txt', usecols=3, skip_header=1)
 
Z=np.genfromtxt('VIC_HDZ.txt', usecols=4, skip_header=1)
 
time = np.linspace(0,24,1440)
fig, ax = plt.subplots(3,1,figsize=(12,6))
plt.xlabel('Universal time (Hour)')
 
 
#H
ax[0,0].plot(time, H)
ax[0,0].set_ylabel(f'$H (nt)$')
ax[0,0].set_title('Victoria (VIC)')
 
#D
ax[1,0].plot(time, D)
ax[1,0].set_ylabel(f'$D (deg)$')
 
#Z
ax[2,0].plot(time, Z)
ax[2,0].set_ylabel(f'$Z (nt)$')
 
#pero obtengo un error de IndexError: too many indices for array
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder