Bonjour
1) En exécutant le code suivant, aucun graphique n'est affiché et le message suivant apparait: Note on using QApplication.exec_():
The GUI event loop is already running in the pyzo kernel, and exec_()
does not block. In most cases your app should run fine without the need
for modifications. For clarity, this is what the pyzo kernel does:
- Prevent deletion of objects in the local scope of functions leading to exec_()
- Prevent system exit right after the exec_() call.
Je ne comprends pas le problème (je suis sur mac).Code:
1
2
3
4
5
6
7
8
9
10
11
12
13 from pylab import * from mpl_toolkits.mplot3d import Axes3D ax = Axes3D(figure()) X = np.arange(-4, 4, 0.25) Y = np.arange(-4, 4, 0.25) X, Y = np.meshgrid(X, Y) R = np.sqrt(X**2 + Y**2) Z = np.sin(R) ax.plot_surface(X, Y, Z, rstride=1, cstride=1, cmap='hot') show()
2) Je travaille sur le problème à N corps(mécanique céleste) et j'obtiens toute une série de coordonnées (x,y,z) dans un tableau numpy. Est-il possible de représenter la trajectoire en 3d (relier les points)?
Merci pour toutes réponses.