do_plot = function(out){ all_out <<- bind_rows(all_out,out) ( all_out %>% rename(value=total_time) %>% select(value,.chain,name) %>% group_by_at(.vars=vars(-c(value,.chain))) %>% summarise( value = mean(value) , .groups = 'drop' ) %>% arrange(value) ) -> means print(means) ( all_out %>% rename(value=total_time) %>% ggplot() + facet_wrap(~name,ncol=1,scales='free_y') + geom_histogram( aes( x = value ) , colour = 'transparent' , position = 'identity' , alpha = .5 ) + scale_x_log10() # + scale_y_log10() ) -> p print(p) return(invisible(NULL)) }