@@ -71,12 +71,14 @@ def main():
71
71
# OpenAI spinup's progress
72
72
if args .filename == 'progress.txt' or args .filename == 'progress.csv' :
73
73
args .xkey = 'TotalEnvInteracts'
74
- args .ykey = ['AverageTestEpRet' ]
74
+ if len (args .ykey ) == 1 :
75
+ args .ykey = ['AverageTestEpRet' ]
75
76
76
77
# rl-plotter's evaluator
77
78
if args .filename == 'evaluator.csv' :
78
79
args .xkey = 'total_steps'
79
- args .ykey = ['mean_score' ]
80
+ if len (args .ykey ) == 1 :
81
+ args .ykey = ['mean_score' ]
80
82
81
83
if args .save is False :
82
84
args .show = True
@@ -86,12 +88,14 @@ def main():
86
88
for result in allresults :
87
89
result ['data' ].insert (len (result ['data' ].columns ),'Condition1' , pu .default_split_fn (result ))
88
90
datas .append (result ['data' ])
89
- pu .plot_data (data = datas , xaxis = args .xkey , value = args .ykey [0 ], smooth = args .smooth ,
90
- legend_outside = args .legend_outside ,
91
- legend_loc = args .legend_loc ,
92
- legend_borderpad = args .borderpad ,
93
- legend_labelspacing = args .labelspacing ,
94
- font_scale = args .font_scale )
91
+ for value in args .ykey :
92
+ plt .figure ()
93
+ pu .plot_data (data = datas , xaxis = args .xkey , value = value , smooth = args .smooth ,
94
+ legend_outside = args .legend_outside ,
95
+ legend_loc = args .legend_loc ,
96
+ legend_borderpad = args .borderpad ,
97
+ legend_labelspacing = args .labelspacing ,
98
+ font_scale = args .font_scale )
95
99
plt .title (args .title )
96
100
plt .xlabel (args .xlabel )
97
101
plt .ylabel (args .ylabel )
0 commit comments