diff --git a/lib/plots.py b/lib/plots.py index 4bc7cd1..19c8b26 100755 --- a/lib/plots.py +++ b/lib/plots.py @@ -24,8 +24,21 @@ class DynamicUpdate(): def on_launch(self): #Set up plot - self.fig = plt.figure(figsize=(10,10)) + self.fig = plt.figure(figsize=(10,10), facecolor='k') self.ax = self.fig.add_subplot(projection='3d') + self.ax.set_facecolor('k') + self.ax.xaxis.label.set_color('w') + self.ax.yaxis.label.set_color('w') + self.ax.zaxis.label.set_color('w') + self.ax.tick_params(axis='x',colors='w') + self.ax.tick_params(axis='y',colors='w') + self.ax.tick_params(axis='z',colors='w') + self.ax.w_xaxis.line.set_color('w') + self.ax.w_yaxis.line.set_color('w') + self.ax.w_zaxis.line.set_color('w') + self.ax.w_xaxis.set_pane_color((0,0,0,0)) + self.ax.w_yaxis.set_pane_color((0,0,0,0)) + self.ax.w_zaxis.set_pane_color((0,0,0,0)) self.lines = [] for i,body in enumerate(self.dyn_syst.bodylist): x, y, z = body.q @@ -37,7 +50,7 @@ class DynamicUpdate(): self.set_lims() #Other stuff self.ax.grid() - self.ax.legend() + self.ax.legend(labelcolor='w', frameon=True, framealpha=0.2) def on_running(self, dyn_syst, step=None, label=None): xdata, ydata, zdata = dyn_syst.get_positions() @@ -49,7 +62,7 @@ class DynamicUpdate(): x, y, z = body.q self.lines[i].set_data_3d([x], [y], [z]) if not label is None: - self.ax.set_title(label) + self.ax.set_title(label,color='w') #Need both of these in order to rescale self.ax.relim() self.ax.autoscale_view() diff --git a/plots/dynsyst.gif b/plots/dynsyst.gif index bcb0f40..b5504c0 100644 Binary files a/plots/dynsyst.gif and b/plots/dynsyst.gif differ