【发布时间】:2019-03-02 14:02:09
【问题描述】:
我正在寻找一种防止标签重叠的方法。在通过 Stackoverflow 搜索时,我什至找不到任何关于如何控制 x 轴间距的建议。
matplotlib.pyplot.xticks(x, xticks, rotation=90)
matplotlib.pyplot.plot(x, y)
matplotlib.pyplot.bar(x, y, alpha=0.2)
matplotlib.pyplot.title(
f"średnia cena produktu {self.identifier}, według kontrahentów")
matplotlib.pyplot.xlabel("kontrahent")
matplotlib.pyplot.ylabel("cena")
matplotlib.pyplot.tight_layout()
matplotlib.pyplot.savefig(os.path.join(
"products", self.identifier, "wykres.png"))
matplotlib.pyplot.close()
【问题讨论】:
标签: python matplotlib