Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/ZhaJiMan/frykit
/ functions
Functions
269 in github.com/ZhaJiMan/frykit
⨍
Functions
269
◇
Types & classes
52
↓ 1 callers
Function
_get_geoaxes_boundary
获取 data 坐标系里的 GeoAxes.patch 对应的多边形
src/frykit/plot/api.py:859
↓ 1 callers
Function
_get_max_workers
(n_jobs: int)
src/frykit/plot/utils.py:151
↓ 1 callers
Function
_images_to_array2d
(images: Any)
src/frykit/image.py:80
↓ 1 callers
Method
_init
(self)
src/frykit/plot/artist.py:248
↓ 1 callers
Method
_init
(self)
src/frykit/plot/artist.py:325
↓ 1 callers
Method
_init
(self)
src/frykit/plot/artist.py:536
↓ 1 callers
Method
_init
(self)
src/frykit/plot/artist.py:624
↓ 1 callers
Method
_init
(self)
src/frykit/plot/artist.py:686
↓ 1 callers
Function
_line_string_codes
(n: int)
src/frykit/plot/utils.py:43
↓ 1 callers
Function
_resolve_strict_clip
(strict_clip: bool | None)
src/frykit/plot/api.py:851
↓ 1 callers
Function
_set_axes_ticks
设置 PlateCarree 投影的普通 Axes 的刻度
src/frykit/plot/api.py:1279
↓ 1 callers
Function
_set_complex_geoaxes_ticks
设置非 PlateCarree 和 Mercator 投影的 GeoAxes 的刻度
src/frykit/plot/api.py:1349
↓ 1 callers
Function
_set_simple_geoaxes_ticks
设置 PlateCarree 和 Mercator 投影的 GeoAxes 的刻度
src/frykit/plot/api.py:1310
↓ 1 callers
Function
_validate_bool
(name: str, value: Any)
src/frykit/conf.py:24
↓ 1 callers
Function
_validate_data_source
(value: Any)
src/frykit/conf.py:17
↓ 1 callers
Function
add_cn_line
在 Axes 上添加中国的修饰线段 Parameters ---------- ax : Axes 目标 Axes name : {'省界', '特别行政区界', '九段线', '未定国界'} or iterable object of str,
src/frykit/plot/api.py:423
↓ 1 callers
Function
add_cn_province
在 Axes 上添加中国省界 Parameters ---------- ax : Axes 目标 Axes province : NameOrAdcode or iterable object of NameOrAdcode or None, d
src/frykit/plot/api.py:220
↓ 1 callers
Function
add_texts
在 Axes 上添加一组文本 Parameters ---------- ax : Axes 目标Axes x, y : (n,) array_like of float 文本的横纵坐标 s : (n,) array_li
src/frykit/plot/api.py:591
↓ 1 callers
Function
arange2
尽可能包含 stop 的 np.arange
src/frykit/calc.py:496
↓ 1 callers
Method
assert_field
断言名字是否属于配置字段
src/frykit/conf.py:59
↓ 1 callers
Function
binning2d
对散点数据做二维分箱 内部通过 pd.cut 实现。当 bins 单调递减时,会先排成升序再调用 pd.cut,最后倒转结果顺序。 Parameters x, y : (n1, n2, ...) array_like 数据点的坐标 values
src/frykit/calc.py:540
↓ 1 callers
Function
chdir_context
临时切换工作目录的上下文管理器 See Also -------- contextlib.chdir
src/frykit/utils.py:63
↓ 1 callers
Function
dd_to_dm
十进制度数转为度分
src/frykit/calc.py:181
↓ 1 callers
Function
del_dir
删除目录
src/frykit/utils.py:48
↓ 1 callers
Function
deprecator
( deprecated: Callable[P, T], *, alternative: str | Callable[..., Any] | Iterable[str | Ca
src/frykit/utils.py:222
↓ 1 callers
Function
get_cn_line
(name: LineName = "九段线")
src/frykit/shp/data.py:708
↓ 1 callers
Function
get_countries
获取所有国界的多边形
src/frykit/shp/data.py:738
↓ 1 callers
Function
get_package_version
获取包的版本号
src/frykit/utils.py:79
↓ 1 callers
Function
inplace_transform
(coords: NDArray[np.float64])
src/frykit/plot/utils.py:219
↓ 1 callers
Function
interp_nearest_2d
可以限制搜索半径的二维最近邻插值 相比 interp_nearest_dd,输入的形状更灵活,方便处理卫星的非规则网格数据。 Parameters ---------- x, y : (n1, n2, ...) array_like 数据点的坐标
src/frykit/calc.py:438
↓ 1 callers
Function
is_finite
判断数组是否不含 nan 或 inf
src/frykit/calc.py:665
↓ 1 callers
Function
lon_to_180
经度从 [0, 360] 范围换算到 (-180, 180],180 会映射到 180。默认使用角度。
src/frykit/calc.py:57
↓ 1 callers
Function
main
()
script/measure_time.py:69
↓ 1 callers
Function
make_ellipse
生成椭圆的 xy 坐标序列 Parameters ---------- x, y : float, default 0 中心的 xy 坐标。默认为 0。 a : float, default 1 半长轴长度。默认为 1。
src/frykit/calc.py:233
↓ 1 callers
Function
make_transformer
创建 pyproj 的 Transformer 对象
src/frykit/plot/utils.py:146
↓ 1 callers
Function
orient_polygon
(polygon: shapely.Polygon, ccw: bool = True)
src/frykit/shp/utils.py:60
↓ 1 callers
Function
path_to_polygon
将 Matplotlib 的 Path 对象转为多边形对象 - 空 Path 对应空多边形 - 如果 Path 对应 Polygon,要求内外环的绕行方向相反 - 如果 Path 对应 MultiPolygon,要求各成员的内外环绕行规则相同 - 坐标不满足要求时可
src/frykit/plot/utils.py:106
↓ 1 callers
Function
plot_centered_discrete_cbar
画出 CenteredBoundaryNorm 的效果
example/colorbar.py:34
↓ 1 callers
Function
plot_city_map
绘制市界地图
example/label_names.py:35
↓ 1 callers
Function
plot_district_map
绘制县界地图
example/label_names.py:48
↓ 1 callers
Function
plot_province_map
绘制省界地图
example/label_names.py:22
↓ 1 callers
Function
plot_qualitative_cbar
画出 make_qualitative_palette 的效果
example/colorbar.py:18
↓ 1 callers
Function
project_geometry
(geometry: GeometryT, crs_from: CRS, crs_to: CRS)
src/frykit/plot/utils.py:166
↓ 1 callers
Function
set_map_ticks
设置地图的范围和刻度 当 ax 是普通 Axes 时,认为其投影是 PlateCarree。 当 ax 是 GeoAxes 时,如果 ax 的边框不是矩形或跨越了日界线,可能产生错误的结果。 此时建议换用 GeoAxes.gridlines。 Parameters
src/frykit/plot/api.py:1491
↓ 1 callers
Function
t_to_az
x 轴夹角转为方位角。方位角范围 [0, 360),90 会映射到 0。默认使用弧度。
src/frykit/calc.py:109
Method
__call__
(self, value: Any, clip: bool | None = None)
src/frykit/plot/api.py:2166
Method
__enter__
(self)
src/frykit/shp/binary.py:284
Method
__eq__
(self, other: Any)
src/frykit/plot/artist.py:83
Method
__exit__
(self, *exc: Any)
src/frykit/shp/binary.py:287
Method
__getitem__
(self, key: str)
src/frykit/plot/api.py:2250
Method
__hash__
(self)
src/frykit/plot/artist.py:89
Method
__init__
( self, boundaries: ArrayLike, vcenter: float = 0, clip: bool = False )
src/frykit/plot/api.py:2156
Method
__init__
(self, geometry: BaseGeometry)
src/frykit/plot/artist.py:80
Method
__init__
( self, ax: Axes, geometries: Sequence[BaseGeometry] | NDArray[np.object_], cr
src/frykit/plot/artist.py:202
Method
__init__
( self, x: ArrayLike, y: ArrayLike, s: ArrayLike, skip_outside: bool |
src/frykit/plot/artist.py:277
Method
__init__
( self, Q: Quiver, U: float, units: str = "m/s", width: float = 0.15,
src/frykit/plot/artist.py:343
Method
__init__
( self, x: float, y: float, angle: float | None = None, size: float =
src/frykit/plot/artist.py:454
Method
__init__
( self, ax: Axes, x: float, y: float, length: float = 1000, un
src/frykit/plot/artist.py:581
Method
__init__
(self, *args, **kwargs)
src/frykit/plot/artist.py:786
Method
__init__
(self)
src/frykit/shp/binary.py:47
Method
__init__
(self, filepath: StrOrBytesPath)
src/frykit/shp/binary.py:270
Method
__post_init__
(self)
src/frykit/conf.py:54
Function
_cached_geometries_to_paths
( geometries: Iterable[BaseGeometry] | NDArray[np.object_], )
src/frykit/plot/artist.py:121
Function
_encode_geometry
(geometry: BaseGeometry)
src/frykit/shp/binary.py:172
Method
_set_transform
(self)
src/frykit/plot/artist.py:436
Function
_with_lock
(func: Callable[P, T])
src/frykit/plot/artist.py:67
Function
add_box
在 Axes 上添加一个方框 Parameters ---------- ax : Axes 目标 Axes extents : (4,) tuple of float 方框范围 (x0, x1, y0, y1) step
src/frykit/plot/api.py:1836
Function
add_cn_border
在 Axes 上添加中国国界 Parameters ---------- ax : Axes 目标 Axes fast_transform : bool or None, default None 是否直接用 pyproj 做坐标变
src/frykit/plot/api.py:379
Function
add_cn_city
在 Axes 上添加中国市界 Parameters ---------- ax : Axes 目标 Axes city : NameOrAdcode or iterable object of NameOrAdcode or None, defau
src/frykit/plot/api.py:268
Function
add_cn_district
在 Axes 上添加中国县界 Parameters ---------- ax : Axes 目标 Axes district : NameOrAdcode or iterable object of NameOrAdcode or None, d
src/frykit/plot/api.py:321
Function
add_compass
在 Axes 上添加指北针 Parameters ---------- ax : Axes 目标 Axes x, y : float 指北针的横纵坐标。基于 Axes 坐标系。 angle : float or None,
src/frykit/plot/api.py:1705
Function
add_countries
在 Axes 上添加所有国家的国界 Parameters ---------- ax : Axes 目标 Axes fast_transform : bool or None, default None 是否直接用 pyproj 做
src/frykit/plot/api.py:467
Function
add_frame
在 Axes 上添加 GMT 风格的边框 需要先设置好 Axes 的刻度,再调用该函数。 Parameters ---------- ax : Axes 目标 Axes。仅支持 PlateCarree 和 Mercator 投影的 GeoAxes。
src/frykit/plot/api.py:1801
Function
add_land
在 Axes 上添加陆地 注意全球数据可能在地图边界出现错误的结果 Parameters ---------- ax : Axes 目标 Axes fast_transform : bool or None, default None
src/frykit/plot/api.py:507
Function
add_mini_axes
在 Axes 的角落添加一个新的 Axes 并返回 Parameters ---------- ax : Axes 原有的 Axes shrink : float, default 0.4 缩小倍数。默认为 0.4。shrink=1
src/frykit/plot/api.py:1879
Function
add_ocean
在 Axes 上添加海洋 注意全球数据可能在地图边界出现错误的结果 Parameters ---------- ax : Axes 目标 Axes fast_transform : bool or None, default None
src/frykit/plot/api.py:549
Function
add_quiver_legend
在 Axes 的角落添加 Quiver 的图例(带矩形背景的 QuiverKey) 箭头下方有形如 '{U} {units}' 的标签。 Parameters ---------- Q : Quiver Axes.quiver 返回的对象
src/frykit/plot/api.py:1642
Function
add_scale_bar
在 Axes 上添加地图比例尺 当 ax 是普通 Axes 时,认为其投影是 PlateCarree。 会根据 ax 的投影计算比例尺大小。 Parameters ---------- ax : Axes 目标 Axes x, y
src/frykit/plot/api.py:1767
Function
add_side_axes
在 Axes 旁边新添一个等高或等宽的 Axes 并返回该对象 Parameters ---------- ax : Axes or array_like of Axes 原有的 Axes。可以是一组 Axes 构成的数组。 width : flo
src/frykit/plot/api.py:1982
Function
az_to_t
方位角转为 x 轴夹角。夹角范围 (-180, 180],270 会映射到 180。默认使用弧度。
src/frykit/calc.py:118
Function
clear_data_cache
清除数据缓存
src/frykit/shp/data.py:794
Function
clear_path_cache
清理几何对象到 Path 的缓存
src/frykit/plot/artist.py:101
Function
clip_by_cn_border
用中国国界裁剪 Artist Parameters ---------- artist: Artist or iterable of Artist 被裁剪的 Artist 对象。可以是多个 Artist。 ax : Axes or None, de
src/frykit/plot/api.py:1151
Function
clip_by_cn_city
用中国市界裁剪 Artist Parameters ---------- artist: Artist or iterable of Artist 被裁剪的 Artist 对象。可以是多个 Artist。 city : NameOrAdcode o
src/frykit/plot/api.py:1055
Function
clip_by_cn_district
用中国县界裁剪 Artist Parameters ---------- artist: Artist or iterable of Artist 被裁剪的 Artist 对象。可以是多个 Artist。 district : NameOrAdco
src/frykit/plot/api.py:1103
Function
clip_by_cn_province
用中国省界裁剪 Artist Parameters ---------- artist: Artist or iterable of Artist 被裁剪的 Artist 对象。可以是多个 Artist。 province : NameOrAdcod
src/frykit/plot/api.py:1008
Function
clip_by_land
用陆地边界裁剪 Artist 注意全球数据可能在地图边界出现错误的结果 Parameters ---------- artist: Artist or iterable of Artist 被裁剪的 Artist 对象。可以是多个 Artist。
src/frykit/plot/api.py:1195
Function
clip_by_ocean
用海洋边界裁剪 Artist 注意全球数据可能在地图边界出现错误的结果 Parameters ---------- artist: Artist or iterable of Artist 被裁剪的 Artist 对象。可以是多个 Artist。
src/frykit/plot/api.py:1237
Function
compare_images
通过求两张图片的绝对差值比较前后差异 要求两张图片大小和模式相同。 Parameters ---------- image1 : ImageInput 第一张图片 image2 : ImageInput 第二张图片
src/frykit/image.py:200
Function
compare_sets
将新旧两组值转换为集合,比较得到新增的元素和缺失的元素。
src/frykit/utils.py:107
Function
count_consecutive_trues
统计布尔序列里真值连续出现的次数,返回相同长度的序列。
src/frykit/calc.py:348
Function
cprofiler
cProfile 的装饰器。保存结果到指定路径。
src/frykit/prof.py:14
Function
dd_to_dms
十进制度数转为度分秒
src/frykit/calc.py:194
Function
decode_binary
将二进制解码成一组几何对象
src/frykit/shp/binary.py:262
Function
decorator
(deprecated: Callable[P, T])
src/frykit/utils.py:277
Function
decorator
(func: Callable[P, T])
src/frykit/prof.py:17
Function
del_file
删除文件
src/frykit/utils.py:34
Function
dm_to_dd
度分转为十进制度数
src/frykit/calc.py:169
Function
dms_to_dd
度分秒转为十进制度数
src/frykit/calc.py:175
Method
draw
(self, renderer: RendererBase)
src/frykit/plot/artist.py:268
← previous
next →
101–200 of 269, ranked by callers