如何使用matplotlib减小y刻度?
这是我创建情节的代码:
plt.plot(loss)
plt.locator_params(nbins=10)
plt.title('andamento loss')
plt.ylabel('loss')
plt.xlabel('epoch')
plt.show()
plt.savefig('andamento_loss.png')
但我收到此错误:
UserWarning: 'set_params()' not defined for locator of type <class 'matplotlib.category.StrCategoryLocator'>
str(type(self)))
我该如何解决这个问题?