One way I found after some struggling is creating a function which gets data_plot matrix, file name and order as parameter to create boxplots from the given data in the ordered figure (different orders = different figures) and save it under the given file_name.
def plotFigure(data_plot,file_name,order):
fig = plt.figure(order, figsize=(9, 6))
ax = fig.add_subplot(111)
bp = ax.boxplot(data_plot)
fig.savefig(file_name, bbox_inches='tight')
plt.close()