def generate_data_boxplots(data, ticks, x_axis_label, y_axis_label, file_path):
    fig, ax = plt.subplots()
bp = ax.boxplot(data, sym='r+')
plt.xticks(numpy.arange(1, len(ticks) + 1), ticks, rotation=15)
ax.set_xlabel(x_axis_label)
ax.set_ylabel(y_axis_label)
for i in range(len(data)):
    med = bp['medians'][i]
ax.plot([numpy.average(med.get_xdata())], [numpy.average(data[i])], color=
    'w', marker='s', markeredgecolor='k')
fig.savefig(file_path + '.png', bbox_inches='tight')
fig.close()
Texts being cut of plot - Matplotlib / Python