Skip to content

Commit

Permalink
Add check if DISPLAY exists.
Browse files Browse the repository at this point in the history
  • Loading branch information
temetski committed Nov 11, 2017
1 parent 950e129 commit 42fc159
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions plot_init.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
from __future__ import division
import numpy as np
import os
import matplotlib
matplotlib.use("Agg")
if os.name == 'posix' and "DISPLAY" not in os.environ:
matplotlib.use('Agg')
import matplotlib.pyplot as plt
import seaborn as sns
rc = {'font.size':16,
'legend.fontsize':16,
'axes.labelsize':18,
'xtick.labelsize':16,
'ytick.labelsize':16}
sns.set(context="paper", style="white", palette="colorblind", rc=rc)
# sns.set(font_scale=2)
# sns.axes_style
sns.set(context="paper", style="white", palette="colorblind", rc=rc)

0 comments on commit 42fc159

Please sign in to comment.