Here is the explanation why I need this. I have a loop that calculates some statistics for a group and produces a figure for it. Unfortunately, once I run this loop, in the output I see at first all the standard output with statistics for all groups and then separately graphs for all the groups. I would like to organize the output so that the statistics data comes right before the graph. Dear community, what can you recommend?