Skip to content
Snippets Groups Projects
Commit fbd5704a authored by U.Mattschas's avatar U.Mattschas
Browse files

Update analysis.plot()

parent 5292de13
No related branches found
No related tags found
No related merge requests found
Pipeline #4811 passed
...@@ -245,24 +245,18 @@ class Analysis: ...@@ -245,24 +245,18 @@ class Analysis:
""" """
self.results.to_csv(path_or_buf = filename+'.csv') self.results.to_csv(path_or_buf = filename+'.csv')
def Plot(self):
...
def plot(self): def plot(self):
times = np.linspace(0, self.tPoints["Mean"][len(self.tPoints["Mean"])-1], 1000) times = pd.Series(np.linspace(0, self.tPoints["Mean"][len(self.tPoints["Mean"])-1], 10))
x_eom = self.xEOM([self.results["vx"]], times) x_eom = np.array(self.xEOM([self.results["vx"]], times), dtype=pd.Series)
y_eom = self.yEOM([self.results["w"], self.results["vy"], self.results["vz"]], times) y_eom = np.array(self.yEOM([self.results["w"], self.results["vy"], self.results["vz"]], times), dtype=pd.Series)
z_eom = self.zEOM([self.results["w"], self.results["vy"], self.results["vz"]], times) z_eom = np.array(self.zEOM([self.results["w"], self.results["vy"], self.results["vz"]], times), dtype=pd.Series)
fig = plt.figure() fig = plt.figure()
# Make a 3D plot # Make a 3D plot
ax1 = fig.add_subplot(1, 2, 1, projection="3d") ax1 = fig.add_subplot(1, 2, 1, projection="3d")
ax1.plot(np.array(x_eom, dtype=pd.Series), ax1.plot(x_eom, y_eom, z_eom,)
np.array(y_eom, dtype=pd.Series),
np.array(z_eom, dtype=pd.Series))
ax1.set_xlabel('x') ax1.set_xlabel('x')
ax1.set_ylabel('y') ax1.set_ylabel('y')
ax1.set_zlabel('z') ax1.set_zlabel('z')
...@@ -292,19 +286,12 @@ class Analysis: ...@@ -292,19 +286,12 @@ class Analysis:
# ax3.set_ylimit(np.min(z_eom)) # ax3.set_ylimit(np.min(z_eom))
ax3.plot(z_eom, y_eom) ax3.plot(z_eom, y_eom)
ax3.plot(self.tPoints['Mean'], self.yPoints['Mean'], 'o') # ax3.plot(self.tPoints['Mean'], self.yPoints['Mean'], 'o')
ax3.set_xlabel('t') ax3.set_xlabel('t')
ax3.set_ylabel('y') ax3.set_ylabel('y')
# ax3.plt.savefig('y.pdf', format='pdf') # ax3.plt.savefig('y.pdf', format='pdf')
# ax3.plt.gcf().clear() # ax3.plt.gcf().clear()
# zPlot():
# plt.plot(self.tPoints['Mean'], self.zEOM(self.zResults.beta, self.tPoints['Mean']))
# plt.plot(self.tPoints['Mean'], self.zPoints['Mean'], 'o')
# plt.xlabel('t')
# plt.ylabel('z')
# plt.savefig('z.pdf', format='pdf')
# plt.gcf().clear()
plt.subplots_adjust(left=0, right=0.99) plt.subplots_adjust(left=0, right=0.99)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment