-
Notifications
You must be signed in to change notification settings - Fork 0
/
plot.py
38 lines (28 loc) · 1.04 KB
/
plot.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import json
import matplotlib.pyplot as plt
import sspde.argparsing as argparsing
import sspde.experiments.output as output
import sspde.plot as plot
import sspde.utils as utils
args = argparsing.parse_plot_args()
data_file_path = args.data_file
with open(data_file_path) as f:
data = json.load(f)
gubs_comparison_expr_vals_json = utils.try_key(
data, 'gubs_comparison_expr_vals')
alpha_expr_vals_json = utils.try_key(data, 'alpha_expr_vals')
gubs_comparison_expr_vals = None if gubs_comparison_expr_vals_json is None else output.GUBSComparisonExprOutput.from_json(
{
**gubs_comparison_expr_vals_json, 'p_max': data['p_max']
})
alpha_expr_vals = None if alpha_expr_vals_json is None else output.AlphaExprOutput.from_json(
alpha_expr_vals_json)
p_max = utils.try_key(data, 'p_max')
plot.plot_data(
gubs_comparison_expr_vals,
alpha_expr_vals,
p_max,
log_alpha=args.log_scale_x_alpha,
output_file_path=args.output_file,
)
plt.show()