区域填充函数有 fill(*args, **kwargs) 和fill_between() 1 绘制填充多边形fill() 1.1 语法结构 fill(*args, **kwargs) args - sequence of x, y, [color] ax.fill(x, y) # a polygon with default color ax.fill(x, y, "b") # a blue polygon ax.fill(x, y, x2, y2) # two polygons
#!/usr/bin/env python # -*- coding: utf-8 -*- from math import sqrt import shapefile from matplotlib import pyplot from descartes import PolygonPatch from shapely.geometry import Polygon, LineString, Point # used to import dictionary data to shapely
网上学习资料:https://2d.hep.com.cn/1865445/9 numpy库内容: 函数 描述 np.array([x,y,z],dtype=int) 从Python列表和元组创造数组 np.arange(x,y,i) 创建一个从x到y,步长为 i 的数组 np.linspace(x,y,n) 创建一个从x到y,等分成 n 个元素的数组 np.indices((m,n)) 创建一个 m 行 n 列的矩阵 np.random.rand(m,n) 创建一个 m 行 n 列的随机数