fig = plt.figure()
plt.errorbar(tuple(indices), tuple(values), tuple(errors), marker='.')
plt.xlim([-0.5, len(values) - 0.5])
plt.xlabel('My x-axis title')
plt.ylabel('My y-axis title')
plt.title(title)
plt.savefig(plot_file_name)
plt.close(fig)
matplotlib получить значения ylim