今日学习了python的词云技术 from os import path from wordcloud import WordCloud import matplotlib.pyplot as plt d=path.dirname(__file__) text=open(path.join(d,"data//constitution.txt")).read() # 步骤3-2:设置一张词云图对象 wordcloud = WordCloud(background_color="
import matplotlib.pyplot as plt import numpy as np fig, axes = plt.subplots(2, 2) def showim(): for i in range(2): for j in range(2): axes[i,j].plot(np.random.randint(10,size=10)) # 为每个子图添加标题 axes[i,j].set_title("picture "+str(i)+" "+s
主要用代码注释来初步学习OpenCV-Python 1. 图片初使用(结合matplotlib) import cv2from matplotlib import pyplot as plt #Load an color image in grayscaleimg = cv2.imread(r'woman.jpg',0) #0表示cv2.IMREAD_GRAYSCALE.另1表示cv2.IMREAD_COLOR, -1表示cv2.IMREAD_UNCHANGEDplt.imshow(img,cm