zhajiman.github.io - 炸鸡人博客 - 基本上无害

Description: A minimal Hugo theme with nice theme color.

Example domain paragraphs

罗切斯特大学朱禺皓的 博客文章 ,基于颜色匹配实验的原始论文跟后人的调查,先从单位系统和色度系数讲起,再引入颜色匹配函数的概念和计算方法,并直接指出颜色匹配函数就是匹配单位功率单色光的亮度时,红绿蓝三基色的亮度经亮度系数缩放后的值。本文讲解的顺序跟一般教科书相反,显得更加自然和易于理解。专业术语的翻译可能有误,还请读者指正。

裁剪或者说白化,就是让填色图只显示在多边形里面,不显示在多边形外面,例如只显示 GeoAxes.contourf 在中国境内的结果。实现方法为:

from matplotlib.path import Path from cartopy.mpl.patch import geos_to_path from cartopy.io.shapereader import Reader reader = Reader(filepath) geom = next(reader.geometries()) reader.close() cf = ax.contourf(X, Y, Z, transform=crs) geom = ax.projection.project_geometry(geom, crs) path = Path.make_compound_path(*geos_to_path(geom)) for col in cf.collections: col.set_clip_path(path, ax.transData) 将 crs 坐标系上的多边形对象变换到 data 坐标系上。 利用 geos_to_path 和 make_compound_path 将变换后的多边形转为 Path 对象。 对 QuadContourSet.collecti