que hice mal
Publicado por Felipe Z (2 intervenciones) el 14/03/2021 01:27:07
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
def vertices(z0, R, N):
# ENTRADAS
z0=-5 # z0 es la profundidad.
R=2 # R es el radio.
N= [4,8,20] # N es el número de vertices
#
# SALIDAS
x,z=np.linspace (-2, 2, 100) # x, z Localización de los vértices en coordenadas cartesianas
#None
return (x,z)
fig, ax = plt.subplots(1,1, figsize=(9,9))
x1, z1 = vertices(prof, Radio, 5)
x2, z2 = vertices(prof, Radio, 9)
x3, z3 = vertices(prof, Radio, 21)
ax.plot(x1,z1, linewidth = 3)
ax.plot(x2,z2, linewidth = 3)
ax.plot(x3,z3, linewidth = 3)
ax.set_xlabel('x[m]', fontsize=16)
ax.set_ylabel('$z[m]$', fontsize=16)
ax.set_aspect('equal', adjustable='box')
ax.grid()
Valora esta pregunta


0