Fix plot_metrics() and merge changes from master

in 1 minute and 50 seconds, using 0 compute credits, and was queued for 4 seconds