【发布时间】:2018-12-15 17:40:09
【问题描述】:
我在任何地方都找不到如何用不同的函数绘制两个相邻的图。任何人都可以帮助我吗?我使用 Jupyter Notebook。
第一个函数:
def OccurrenciesPlotting(filtered_sent):
fdist = FreqDist(filtered_sent)
fdist.plot(40,cumulative=False)
第二个功能:
def MyWordCloud(filtered_sent):
img = np.array(Image.open("H....jpg"))
stopwords = set(STOPWORDS)
.
.
.
image_colors = ImageColorGenerator(img)
plt.figure()
plt.imshow(wordcloud.recolor(color_func=image_colors),
interpolation="bilinear")
plt.axis("off")
plt.savefig('wordcloud.png', format="png")
plt.show()
我希望函数的结果一个挨着另一个
非常感谢:)
【问题讨论】:
标签: python matplotlib plot jupyter-notebook subplot