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
修改X,Y,Z轴的刻度值 from matplotlib.ticker import MultipleLocator,FuncFormatter from mpl_toolkits.mplot3d import Axes3D import matplotlib.pyplot as plt from matplotlib import cm from matplotlib import colors from matplotlib.ticker import LinearLocator, Form
今日学习了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="
主要用代码注释来初步学习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