Spaces:
Sleeping
Sleeping
Commit ·
d03fbaa
1
Parent(s): 1bcc7b4
set mpl backend
Browse files- mpl_data_plotter.py +6 -1
mpl_data_plotter.py
CHANGED
|
@@ -1,5 +1,7 @@
|
|
| 1 |
|
| 2 |
import matplotlib.pyplot as plt
|
|
|
|
|
|
|
| 3 |
|
| 4 |
import plot_utils
|
| 5 |
from constants import *
|
|
@@ -17,7 +19,7 @@ class MatplotlibDataPlotter:
|
|
| 17 |
|
| 18 |
def plot_single_domains(self, num_domains, split_name):
|
| 19 |
|
| 20 |
-
#fig = plt.gcf()
|
| 21 |
#fig.set_size_inches(10, 5)
|
| 22 |
selected_region_ids = self.num_domains_in_region_df.loc[
|
| 23 |
self.num_domains_in_region_df.num_domains >= num_domains,
|
|
@@ -41,6 +43,7 @@ class MatplotlibDataPlotter:
|
|
| 41 |
width=0.9
|
| 42 |
|
| 43 |
show_legend=True
|
|
|
|
| 44 |
|
| 45 |
fig = self.single_domains_fig
|
| 46 |
fig.clf()
|
|
@@ -88,7 +91,9 @@ class MatplotlibDataPlotter:
|
|
| 88 |
show_legend=True
|
| 89 |
# fig = plt.figure(figsize=(5, 10))
|
| 90 |
fig = self.pair_domains_fig
|
|
|
|
| 91 |
fig.clf()
|
|
|
|
| 92 |
|
| 93 |
ax = fig.gca()
|
| 94 |
plot_utils.draw_barplots(
|
|
|
|
| 1 |
|
| 2 |
import matplotlib.pyplot as plt
|
| 3 |
+
import matplotlib
|
| 4 |
+
matplotlib.use('agg')
|
| 5 |
|
| 6 |
import plot_utils
|
| 7 |
from constants import *
|
|
|
|
| 19 |
|
| 20 |
def plot_single_domains(self, num_domains, split_name):
|
| 21 |
|
| 22 |
+
# fig = plt.gcf()
|
| 23 |
#fig.set_size_inches(10, 5)
|
| 24 |
selected_region_ids = self.num_domains_in_region_df.loc[
|
| 25 |
self.num_domains_in_region_df.num_domains >= num_domains,
|
|
|
|
| 43 |
width=0.9
|
| 44 |
|
| 45 |
show_legend=True
|
| 46 |
+
print(matplotlib.get_backend())
|
| 47 |
|
| 48 |
fig = self.single_domains_fig
|
| 49 |
fig.clf()
|
|
|
|
| 91 |
show_legend=True
|
| 92 |
# fig = plt.figure(figsize=(5, 10))
|
| 93 |
fig = self.pair_domains_fig
|
| 94 |
+
# fig = plt.gcf()
|
| 95 |
fig.clf()
|
| 96 |
+
print(matplotlib.get_backend())
|
| 97 |
|
| 98 |
ax = fig.gca()
|
| 99 |
plot_utils.draw_barplots(
|