1
0

make leapfrog integrator as System method

This commit is contained in:
Thibault Barnouin
2021-11-06 01:23:36 +01:00
parent 6206307f30
commit 0a91802800
14 changed files with 72 additions and 104 deletions

View File

@@ -21,7 +21,7 @@ class DynamicUpdate():
def on_launch(self):
#Set up plot
self.fig = plt.figure()
self.fig = plt.figure(figsize=(10,10))
self.ax = self.fig.add_subplot(projection='3d')
self.lines, = self.ax.plot([],[],[],'o')
#Autoscale on unknown axis and known lims on the other
@@ -45,8 +45,8 @@ class DynamicUpdate():
#We need to draw *and* flush
self.fig.canvas.draw()
self.fig.canvas.flush_events()
if not step is None and step%10==0:
self.fig.savefig("tmp/{0:05d}.png".format(step),bbox_inches="tight")
if not step is None and step%1000==0:
self.fig.savefig("tmp/{0:06d}.png".format(step),bbox_inches="tight")
#Example
def __call__(self):