diff --git a/rl/analytics.py b/rl/analytics.py index 63cbc80..0a9c261 100644 --- a/rl/analytics.py +++ b/rl/analytics.py @@ -8,8 +8,8 @@ warnings.filterwarnings("ignore", module="matplotlib") -MPL_BACKEND = 'agg' if ( - environ.get('CI') or platform.system() == 'Darwin') else 'TkAgg' +MPL_BACKEND = 'agg' if environ.get('CI') else ( + 'macosx' if platform.system() == 'Darwin' else 'TkAgg') STATS_COLS = [ 'best_session_epi', @@ -139,8 +139,9 @@ def plot(self): ax3.relim() ax3.autoscale_view(tight=True, scalex=True, scaley=True) - self.plt.draw() - self.plt.pause(0.01) + if sys_vars['RENDER']: + self.plt.pause(0.01) + self.plt.draw() self.save() import gc gc.collect()