rsplotlib 0.1.5.post1__tar.gz → 0.1.9__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (78) hide show
  1. rsplotlib-0.1.9/.github/workflows/ci.yml +82 -0
  2. rsplotlib-0.1.9/.github/workflows/release.yml +132 -0
  3. {rsplotlib-0.1.5.post1 → rsplotlib-0.1.9}/.gitignore +4 -0
  4. {rsplotlib-0.1.5.post1 → rsplotlib-0.1.9}/Cargo.lock +47 -21
  5. rsplotlib-0.1.9/Cargo.toml +32 -0
  6. {rsplotlib-0.1.5.post1 → rsplotlib-0.1.9}/PKG-INFO +31 -26
  7. rsplotlib-0.1.9/README.md +763 -0
  8. {rsplotlib-0.1.5.post1 → rsplotlib-0.1.9}/README_zh.md +28 -22
  9. rsplotlib-0.1.9/build_wheel.sh +122 -0
  10. rsplotlib-0.1.9/ci/smoke_test.py +74 -0
  11. {rsplotlib-0.1.5.post1 → rsplotlib-0.1.9}/pyproject.toml +3 -4
  12. rsplotlib-0.1.9/python/rsplotlib/__init__.py +23 -0
  13. {rsplotlib-0.1.5.post1 → rsplotlib-0.1.9}/python/rsplotlib/_font_resolver.py +1 -1
  14. rsplotlib-0.1.9/python/rsplotlib/core/__init__.py +2 -0
  15. {rsplotlib-0.1.5.post1/python/rsplotlib → rsplotlib-0.1.9/python/rsplotlib/core}/api.py +27 -27
  16. rsplotlib-0.1.9/python/rsplotlib/figure/__init__.py +2 -0
  17. rsplotlib-0.1.5.post1/python/rsplotlib/_figure_defaults.py → rsplotlib-0.1.9/python/rsplotlib/figure/_defaults.py +5 -2
  18. rsplotlib-0.1.9/python/rsplotlib/gridspec.py +6 -0
  19. rsplotlib-0.1.9/python/rsplotlib/layout/__init__.py +2 -0
  20. rsplotlib-0.1.9/python/rsplotlib/layout/gridspec.py +161 -0
  21. {rsplotlib-0.1.5.post1 → rsplotlib-0.1.9}/python/rsplotlib/pylab.py +3 -1
  22. {rsplotlib-0.1.5.post1 → rsplotlib-0.1.9}/python/rsplotlib/pyplot.py +226 -28
  23. rsplotlib-0.1.9/python/rsplotlib/ticker.py +6 -0
  24. rsplotlib-0.1.9/python/rsplotlib/ticks/__init__.py +2 -0
  25. rsplotlib-0.1.9/python/rsplotlib/ticks/ticker.py +269 -0
  26. rsplotlib-0.1.9/python/rsplotlib/utils/__init__.py +2 -0
  27. rsplotlib-0.1.9/python/rsplotlib/utils/_font_resolver.py +34 -0
  28. rsplotlib-0.1.9/python/rsplotlib/utils/_rcparams.py +101 -0
  29. {rsplotlib-0.1.5.post1/python/rsplotlib → rsplotlib-0.1.9/python/rsplotlib/utils}/style.py +20 -9
  30. rsplotlib-0.1.9/src/core/colormap.rs +119 -0
  31. rsplotlib-0.1.9/src/core/colors.rs +232 -0
  32. {rsplotlib-0.1.5.post1/src → rsplotlib-0.1.9/src/core}/elements.rs +4 -3
  33. rsplotlib-0.1.9/src/core/marker.rs +182 -0
  34. rsplotlib-0.1.9/src/core/mod.rs +4 -0
  35. {rsplotlib-0.1.5.post1/src → rsplotlib-0.1.9/src/figure}/axes.rs +669 -252
  36. rsplotlib-0.1.9/src/figure/axes_bounds.rs +622 -0
  37. {rsplotlib-0.1.5.post1/src → rsplotlib-0.1.9/src/figure}/axes_grid.rs +50 -22
  38. {rsplotlib-0.1.5.post1/src → rsplotlib-0.1.9/src/figure}/axes_legend.rs +84 -59
  39. {rsplotlib-0.1.5.post1/src → rsplotlib-0.1.9/src/figure}/axes_mesh.rs +82 -31
  40. rsplotlib-0.1.9/src/figure/axes_render_elements.rs +1954 -0
  41. rsplotlib-0.1.9/src/figure/axes_title.rs +201 -0
  42. {rsplotlib-0.1.5.post1/src → rsplotlib-0.1.9/src/figure}/axis.rs +124 -88
  43. rsplotlib-0.1.9/src/figure/figure.rs +1176 -0
  44. rsplotlib-0.1.9/src/figure/mod.rs +10 -0
  45. rsplotlib-0.1.9/src/layout/gridspec.rs +268 -0
  46. rsplotlib-0.1.9/src/layout/mod.rs +1 -0
  47. rsplotlib-0.1.9/src/lib.rs +239 -0
  48. rsplotlib-0.1.9/src/ticks/mod.rs +1 -0
  49. rsplotlib-0.1.9/src/ticks/ticker.rs +485 -0
  50. rsplotlib-0.1.9/src/utils/font_resolver.rs +615 -0
  51. rsplotlib-0.1.9/src/utils/font_stack.rs +159 -0
  52. rsplotlib-0.1.9/src/utils/mod.rs +4 -0
  53. {rsplotlib-0.1.5.post1/src → rsplotlib-0.1.9/src/utils}/pyfuncs.rs +319 -252
  54. rsplotlib-0.1.9/src/utils/style.rs +53 -0
  55. rsplotlib-0.1.9/text_utils +0 -0
  56. rsplotlib-0.1.9/tutorial.css +1721 -0
  57. rsplotlib-0.1.9/tutorial.html +2398 -0
  58. rsplotlib-0.1.9/tutorial.js +313 -0
  59. rsplotlib-0.1.5.post1/.github/ci.yml +0 -60
  60. rsplotlib-0.1.5.post1/.github/release.yml +0 -84
  61. rsplotlib-0.1.5.post1/Cargo.toml +0 -14
  62. rsplotlib-0.1.5.post1/README.md +0 -6
  63. rsplotlib-0.1.5.post1/build_wheel.sh +0 -83
  64. rsplotlib-0.1.5.post1/python/rsplotlib/__init__.py +0 -15
  65. rsplotlib-0.1.5.post1/python/rsplotlib/_rcparams.py +0 -58
  66. rsplotlib-0.1.5.post1/python/rsplotlib/gridspec.py +0 -122
  67. rsplotlib-0.1.5.post1/python/rsplotlib/ticker.py +0 -278
  68. rsplotlib-0.1.5.post1/src/axes_bounds.rs +0 -377
  69. rsplotlib-0.1.5.post1/src/axes_render_elements.rs +0 -1117
  70. rsplotlib-0.1.5.post1/src/axes_title.rs +0 -60
  71. rsplotlib-0.1.5.post1/src/colormap.rs +0 -166
  72. rsplotlib-0.1.5.post1/src/colors.rs +0 -85
  73. rsplotlib-0.1.5.post1/src/figure.rs +0 -411
  74. rsplotlib-0.1.5.post1/src/lib.rs +0 -219
  75. rsplotlib-0.1.5.post1/src/marker.rs +0 -144
  76. rsplotlib-0.1.5.post1/src/text_utils.rs +0 -264
  77. {rsplotlib-0.1.5.post1 → rsplotlib-0.1.9}/LICENSE +0 -0
  78. {rsplotlib-0.1.5.post1 → rsplotlib-0.1.9}/rust-toolchain.toml +0 -0
@@ -0,0 +1,82 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main, master]
6
+ pull_request:
7
+ branches: [main, master]
8
+
9
+ # 同一分支/PR 的新推送会取消仍在进行的旧运行,节省 CI 时间。
10
+ concurrency:
11
+ group: ${{ github.workflow }}-${{ github.ref }}
12
+ cancel-in-progress: true
13
+
14
+ permissions:
15
+ contents: read
16
+
17
+ jobs:
18
+ test:
19
+ name: Test (${{ matrix.os }}, py${{ matrix.python-version }})
20
+ runs-on: ${{ matrix.os }}
21
+ strategy:
22
+ fail-fast: false
23
+ matrix:
24
+ os: [ubuntu-latest, windows-latest, macos-latest]
25
+ python-version: ["3.10", "3.13", "3.14"]
26
+ # 补测最低支持版本 3.8;macOS(arm64) 对 3.8 支持不稳定,故仅在 Linux/Windows 上测。
27
+ include:
28
+ - os: ubuntu-latest
29
+ python-version: "3.10"
30
+ - os: windows-latest
31
+ python-version: "3.10"
32
+ steps:
33
+ - uses: actions/checkout@v4
34
+
35
+ # Linux runner 默认不带字体,plotters 渲染文本会报 FontUnavailable。
36
+ # DejaVu 会安装到 /usr/share/fonts/truetype/dejavu/DejaVuSans.ttf,正是解析器的 Linux 首选路径。
37
+ - name: Install fonts (Linux)
38
+ if: runner.os == 'Linux'
39
+ run: sudo apt-get update && sudo apt-get install -y fonts-dejavu-core
40
+
41
+ - uses: actions/setup-python@v5
42
+ with:
43
+ python-version: ${{ matrix.python-version }}
44
+
45
+ - name: Build wheel
46
+ uses: PyO3/maturin-action@v1
47
+ with:
48
+ command: build
49
+ # -i python 绑定到当前矩阵版本;container:'off' 让 Linux 也直接在宿主机构建,
50
+ # 从而与 setup-python 的版本一致(CI 只需能导入运行,无需 manylinux 合规)。
51
+ args: --release --out dist -i python
52
+ container: "off"
53
+ sccache: "true"
54
+
55
+ - name: Install built wheel
56
+ run: python -m pip install --no-index --find-links dist rsplotlib
57
+
58
+ - name: Run smoke test
59
+ run: python ci/smoke_test.py
60
+
61
+ lint:
62
+ name: Lint (rustfmt + clippy)
63
+ runs-on: ubuntu-latest
64
+ steps:
65
+ - uses: actions/checkout@v4
66
+
67
+ # pyo3 的 build script 需要一个 Python 解释器来探测 ABI。
68
+ - uses: actions/setup-python@v5
69
+ with:
70
+ python-version: "3.13"
71
+
72
+ - uses: dtolnay/rust-toolchain@stable
73
+ with:
74
+ components: rustfmt, clippy
75
+
76
+ - uses: Swatinem/rust-cache@v2
77
+
78
+ - name: Check formatting
79
+ run: cargo fmt --all -- --check
80
+
81
+ - name: Run clippy
82
+ run: cargo clippy -- -D warnings
@@ -0,0 +1,132 @@
1
+ name: Build and Publish Wheels
2
+
3
+ # 触发方式:推送 v* 标签(如 v0.1.8)或在 GitHub 上 Publish 一个 Release。
4
+ # 也可在 Actions 页手动触发(workflow_dispatch)——手动触发只构建、不发布。
5
+ on:
6
+ push:
7
+ tags:
8
+ - "v*"
9
+ release:
10
+ types: [published]
11
+ workflow_dispatch:
12
+
13
+ permissions:
14
+ contents: read
15
+
16
+ jobs:
17
+ # ---------------- Linux: x86_64 + aarch64 ----------------
18
+ # manylinux 容器内含全部 CPython,--find-interpreter 自动为每个版本各产出一个 wheel。
19
+ linux:
20
+ runs-on: ubuntu-latest
21
+ strategy:
22
+ fail-fast: false
23
+ matrix:
24
+ target: [x86_64, aarch64]
25
+ steps:
26
+ - uses: actions/checkout@v4
27
+
28
+ - name: Build wheels (${{ matrix.target }})
29
+ uses: PyO3/maturin-action@v1
30
+ with:
31
+ target: ${{ matrix.target }}
32
+ manylinux: auto
33
+ args: --release --out dist --find-interpreter
34
+
35
+ - uses: actions/upload-artifact@v4
36
+ with:
37
+ name: wheels-linux-${{ matrix.target }}
38
+ path: dist
39
+
40
+ # ---------------- Windows: x64,按 Python 版本矩阵 ----------------
41
+ windows:
42
+ runs-on: windows-latest
43
+ strategy:
44
+ fail-fast: false
45
+ matrix:
46
+ python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
47
+ steps:
48
+ - uses: actions/checkout@v4
49
+
50
+ - uses: actions/setup-python@v5
51
+ with:
52
+ python-version: ${{ matrix.python-version }}
53
+ architecture: x64
54
+
55
+ - name: Build wheel (py${{ matrix.python-version }})
56
+ uses: PyO3/maturin-action@v1
57
+ with:
58
+ # -i python 指向 setup-python 激活的解释器,确保为当前矩阵版本构建。
59
+ args: --release --out dist -i python
60
+
61
+ - uses: actions/upload-artifact@v4
62
+ with:
63
+ name: wheels-windows-${{ matrix.python-version }}
64
+ path: dist
65
+
66
+ # ---------------- macOS: universal2(Intel + Apple Silicon),按版本矩阵 ----------------
67
+ # macos-13(Intel) runner 已退役,改在 arm64 runner 上交叉编译 universal2,
68
+ # 一个 wheel 同时兼容 x86_64 与 arm64,无需 Intel 机器。
69
+ macos:
70
+ runs-on: macos-latest
71
+ strategy:
72
+ fail-fast: false
73
+ matrix:
74
+ python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
75
+ steps:
76
+ - uses: actions/checkout@v4
77
+
78
+ - uses: actions/setup-python@v5
79
+ with:
80
+ python-version: ${{ matrix.python-version }}
81
+
82
+ - name: Build universal2 wheel (py${{ matrix.python-version }})
83
+ uses: PyO3/maturin-action@v1
84
+ with:
85
+ target: universal2-apple-darwin
86
+ args: --release --out dist -i python
87
+
88
+ - uses: actions/upload-artifact@v4
89
+ with:
90
+ name: wheels-macos-${{ matrix.python-version }}
91
+ path: dist
92
+
93
+ # ---------------- 源码分发(sdist)----------------
94
+ # 当某平台/版本无预编译 wheel 时,pip 可用 sdist 从源码构建(需目标机器有 Rust)。
95
+ sdist:
96
+ runs-on: ubuntu-latest
97
+ steps:
98
+ - uses: actions/checkout@v4
99
+
100
+ - name: Build sdist
101
+ uses: PyO3/maturin-action@v1
102
+ with:
103
+ command: sdist
104
+ args: --out dist
105
+
106
+ - uses: actions/upload-artifact@v4
107
+ with:
108
+ name: wheels-sdist
109
+ path: dist
110
+
111
+ # ---------------- 发布到 PyPI(仅标签 / Release 触发)----------------
112
+ publish:
113
+ name: Publish to PyPI
114
+ runs-on: ubuntu-latest
115
+ needs: [linux, windows, macos, sdist]
116
+ if: startsWith(github.ref, 'refs/tags/') || github.event_name == 'release'
117
+ steps:
118
+ - name: Download all artifacts
119
+ uses: actions/download-artifact@v4
120
+ with:
121
+ pattern: wheels-*
122
+ path: dist
123
+ merge-multiple: true
124
+
125
+ - name: Publish
126
+ uses: PyO3/maturin-action@v1
127
+ env:
128
+ # 仓库 Settings → Secrets and variables → Actions 中的 secret 名(值为 PyPI token,以 pypi- 开头)。
129
+ MATURIN_PYPI_TOKEN: ${{ secrets.YJ_NIU }}
130
+ with:
131
+ command: upload
132
+ args: --non-interactive --skip-existing dist/*
@@ -28,7 +28,11 @@ Thumbs.db
28
28
 
29
29
  # Data / plots
30
30
  testing/
31
+ test/
32
+ test*.py
33
+ *.png
31
34
  main*.py
35
+ debug.txt
32
36
  out/
33
37
  wheelhouse/
34
38
  N237S NB.csv
@@ -36,6 +36,12 @@ version = "1.3.2"
36
36
  source = "registry+https://github.com/rust-lang/crates.io-index"
37
37
  checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
38
38
 
39
+ [[package]]
40
+ name = "bitflags"
41
+ version = "2.13.0"
42
+ source = "registry+https://github.com/rust-lang/crates.io-index"
43
+ checksum = "b4388bee8683e3d04af747c73422af53102d2bd24d9eadb6cbc100baef4b43f8"
44
+
39
45
  [[package]]
40
46
  name = "bumpalo"
41
47
  version = "3.20.3"
@@ -135,7 +141,7 @@ dependencies = [
135
141
  "color_quant",
136
142
  "jpeg-decoder",
137
143
  "num-traits",
138
- "png",
144
+ "png 0.17.16",
139
145
  ]
140
146
 
141
147
  [[package]]
@@ -144,15 +150,20 @@ version = "0.3.2"
144
150
  source = "registry+https://github.com/rust-lang/crates.io-index"
145
151
  checksum = "00810f1d8b74be64b13dbf3db89ac67740615d6c891f0e7b6179326533011a07"
146
152
 
153
+ [[package]]
154
+ name = "jpeg-encoder"
155
+ version = "0.7.0"
156
+ source = "registry+https://github.com/rust-lang/crates.io-index"
157
+ checksum = "0b0b36cbb4e6704f12f5b5d7b01dac593982c6550859ebd5a66fb15c9ea27fd5"
158
+
147
159
  [[package]]
148
160
  name = "js-sys"
149
- version = "0.3.99"
161
+ version = "0.3.103"
150
162
  source = "registry+https://github.com/rust-lang/crates.io-index"
151
- checksum = "142bc4740e452c1e57ade0cbc129f139c9093e354346f0872ef985f4f5cf5f11"
163
+ checksum = "53b44bfcdb3f8d5837a46dae1ca9660a837176eee74a28b229bc626816589102"
152
164
  dependencies = [
153
165
  "cfg-if",
154
166
  "futures-util",
155
- "once_cell",
156
167
  "wasm-bindgen",
157
168
  ]
158
169
 
@@ -249,7 +260,20 @@ version = "0.17.16"
249
260
  source = "registry+https://github.com/rust-lang/crates.io-index"
250
261
  checksum = "82151a2fc869e011c153adc57cf2789ccb8d9906ce52c0b39a6b5697749d7526"
251
262
  dependencies = [
252
- "bitflags",
263
+ "bitflags 1.3.2",
264
+ "crc32fast",
265
+ "fdeflate",
266
+ "flate2",
267
+ "miniz_oxide",
268
+ ]
269
+
270
+ [[package]]
271
+ name = "png"
272
+ version = "0.18.1"
273
+ source = "registry+https://github.com/rust-lang/crates.io-index"
274
+ checksum = "60769b8b31b2a9f263dae2776c37b1b28ae246943cf719eb6946a1db05128a61"
275
+ dependencies = [
276
+ "bitflags 2.13.0",
253
277
  "crc32fast",
254
278
  "fdeflate",
255
279
  "flate2",
@@ -330,19 +354,21 @@ dependencies = [
330
354
 
331
355
  [[package]]
332
356
  name = "quote"
333
- version = "1.0.45"
357
+ version = "1.0.46"
334
358
  source = "registry+https://github.com/rust-lang/crates.io-index"
335
- checksum = "41f2619966050689382d2b44f664f4bc593e129785a36d6ee376ddf37259b924"
359
+ checksum = "dfbc457d0c7a0759a614551b11a6409e5951f6c7537be1f1b7682b9ae9230368"
336
360
  dependencies = [
337
361
  "proc-macro2",
338
362
  ]
339
363
 
340
364
  [[package]]
341
365
  name = "rsplotlib"
342
- version = "0.1.5"
366
+ version = "0.1.9"
343
367
  dependencies = [
368
+ "jpeg-encoder",
369
+ "owned_ttf_parser",
344
370
  "plotters",
345
- "png",
371
+ "png 0.18.1",
346
372
  "pyo3",
347
373
  ]
348
374
 
@@ -366,9 +392,9 @@ checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5"
366
392
 
367
393
  [[package]]
368
394
  name = "syn"
369
- version = "2.0.117"
395
+ version = "2.0.118"
370
396
  source = "registry+https://github.com/rust-lang/crates.io-index"
371
- checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99"
397
+ checksum = "1b9ae57f904213ebb649ce6895b8a66c66f0203b9319718f69a5612a065b1422"
372
398
  dependencies = [
373
399
  "proc-macro2",
374
400
  "quote",
@@ -395,9 +421,9 @@ checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75"
395
421
 
396
422
  [[package]]
397
423
  name = "wasm-bindgen"
398
- version = "0.2.122"
424
+ version = "0.2.126"
399
425
  source = "registry+https://github.com/rust-lang/crates.io-index"
400
- checksum = "3ed04576f974d2b2fba0f38c51dbc5518011e38c36bf1143164be765528fd409"
426
+ checksum = "4b067c0c11094aef6b7a801c1e34a26affafdf3d051dba08456b868789aaf9a4"
401
427
  dependencies = [
402
428
  "cfg-if",
403
429
  "once_cell",
@@ -408,9 +434,9 @@ dependencies = [
408
434
 
409
435
  [[package]]
410
436
  name = "wasm-bindgen-macro"
411
- version = "0.2.122"
437
+ version = "0.2.126"
412
438
  source = "registry+https://github.com/rust-lang/crates.io-index"
413
- checksum = "916151b09da36bd82f6615cbf3a419e2f0ba23a03c6160e8e92eb6bd4aa1dec6"
439
+ checksum = "167ce5e579f6bcf889c4f7175a8a5a585de84e8ff93976ce393efa5f2837aab1"
414
440
  dependencies = [
415
441
  "quote",
416
442
  "wasm-bindgen-macro-support",
@@ -418,9 +444,9 @@ dependencies = [
418
444
 
419
445
  [[package]]
420
446
  name = "wasm-bindgen-macro-support"
421
- version = "0.2.122"
447
+ version = "0.2.126"
422
448
  source = "registry+https://github.com/rust-lang/crates.io-index"
423
- checksum = "299047362ccbfce148b67ab7e73349f77748e00c8296f9542adfad2ad82c5c5e"
449
+ checksum = "f3997c7839262f4ef12cf90b818d6340c18e80f263f1a94bf157d0ec4420380e"
424
450
  dependencies = [
425
451
  "bumpalo",
426
452
  "proc-macro2",
@@ -431,18 +457,18 @@ dependencies = [
431
457
 
432
458
  [[package]]
433
459
  name = "wasm-bindgen-shared"
434
- version = "0.2.122"
460
+ version = "0.2.126"
435
461
  source = "registry+https://github.com/rust-lang/crates.io-index"
436
- checksum = "9a929b2c61f11ba3e9bc35b50c1f25cb38e0e892c0c231ae2b8cf78d5dad4437"
462
+ checksum = "dc1b4cb0cc549fcf58d7dfc081778139b3d283a081644e833e84682ad71cea24"
437
463
  dependencies = [
438
464
  "unicode-ident",
439
465
  ]
440
466
 
441
467
  [[package]]
442
468
  name = "web-sys"
443
- version = "0.3.99"
469
+ version = "0.3.103"
444
470
  source = "registry+https://github.com/rust-lang/crates.io-index"
445
- checksum = "6d621441cfc37b84979402712047321980c178f299193a3589d05b99e8763436"
471
+ checksum = "8622dcb61c0bcc9fffa6938bed81210af2da9a7e4a1a834b2e37a59b6dfb6141"
446
472
  dependencies = [
447
473
  "js-sys",
448
474
  "wasm-bindgen",
@@ -0,0 +1,32 @@
1
+ [package]
2
+ name = "rsplotlib"
3
+ version = "0.1.9"
4
+ edition = "2024"
5
+ readme = "README.md"
6
+
7
+ [lib]
8
+ name = "rsplotlib"
9
+ crate-type = ["cdylib"]
10
+
11
+ [dependencies]
12
+ pyo3 = "0.29.0"
13
+ plotters = { version = "0.3.7", default-features = false, features = ["svg_backend", "bitmap_backend", "bitmap_encoder", "ab_glyph", "line_series", "point_series"] }
14
+ png = "0.18.1"
15
+ owned_ttf_parser = "0.25"
16
+ jpeg-encoder = "0.7.0"
17
+
18
+ [profile.release]
19
+ lto = "fat"
20
+ codegen-units = 1
21
+ opt-level = 3
22
+ strip = "symbols"
23
+
24
+ [profile.dev]
25
+ opt-level = 0
26
+ debug = true
27
+
28
+ [lints.clippy]
29
+ too_many_arguments = "allow"
30
+ type_complexity = "allow"
31
+ cast_precision_loss = "allow"
32
+ cast_sign_loss = "allow"
@@ -1,15 +1,14 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: rsplotlib
3
- Version: 0.1.5.post1
3
+ Version: 0.1.9
4
4
  Classifier: Programming Language :: Rust
5
5
  Classifier: Programming Language :: Python :: 3
6
6
  Classifier: Programming Language :: Python :: 3 :: Only
7
- Classifier: Programming Language :: Python :: 3.8
8
- Classifier: Programming Language :: Python :: 3.9
9
7
  Classifier: Programming Language :: Python :: 3.10
10
8
  Classifier: Programming Language :: Python :: 3.11
11
9
  Classifier: Programming Language :: Python :: 3.12
12
10
  Classifier: Programming Language :: Python :: 3.13
11
+ Classifier: Programming Language :: Python :: 3.14
13
12
  Classifier: Programming Language :: Python :: Implementation :: CPython
14
13
  Classifier: License :: OSI Approved :: MIT License
15
14
  Classifier: Operating System :: MacOS
@@ -21,14 +20,14 @@ Summary: A high-performance matplotlib-compatible plotting library powered by Ru
21
20
  Keywords: plotting,matplotlib,visualization,rust,scientific
22
21
  Author: YJ-Niu
23
22
  License: MIT
24
- Requires-Python: >=3.8
23
+ Requires-Python: >=3.10
25
24
  Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
26
25
 
27
26
  # rsplotlib
28
27
 
29
28
  > 一个由 Rust 强力驱动的高性能 Python 绘图库,提供 Matplotlib 兼容 API
30
29
 
31
- [![Python](https://img.shields.io/badge/Python-3.8%2B-blue)](https://www.python.org/)
30
+ [![Python](https://img.shields.io/badge/Python-3.10%2B-blue)](https://www.python.org/)
32
31
  [![Rust](https://img.shields.io/badge/Rust-2021-orange)](https://www.rust-lang.org/)
33
32
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
34
33
  [![PyO3](https://img.shields.io/badge/PyO3-0.29-2c2d72)](https://pyo3.rs/)
@@ -121,11 +120,19 @@ Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
121
120
 
122
121
  | 依赖 | 版本要求 | 说明 |
123
122
  | ------- | -------- | ---------------------- |
124
- | Python | 3.8+ | CPython 实现 |
123
+ | Python | 3.10+ | CPython 实现 |
125
124
  | Rust | 1.70+ | 从源码构建时需要 |
126
125
  | maturin | 1.13+ | Rust-Python 包构建工具 |
127
126
 
128
- ### 方法一:使用 maturin 从源码构建(推荐开发者)
127
+ ### 方法一:从 PyPI 安装(推荐)
128
+
129
+ 已为 Linux(x86_64/aarch64)、macOS(universal2)、Windows(x64)在 Python 3.10-3.14 上发布预编译 wheel,无需 Rust 工具链:
130
+
131
+ ```bash
132
+ pip install rsplotlib
133
+ ```
134
+
135
+ ### 方法二:使用 maturin 从源码构建(推荐开发者)
129
136
 
130
137
  ```bash
131
138
  # 1. 克隆项目
@@ -137,17 +144,17 @@ pip install maturin
137
144
  maturin develop --release
138
145
  ```
139
146
 
140
- ### 方法二:构建 wheel 包
147
+ ### 方法三:构建 wheel 包
141
148
 
142
149
  ```bash
143
- # 使用项目提供的构建脚本
150
+ # 使用项目提供的构建脚本(macOS/Linux 直接运行;Windows 请在 Git Bash 或 WSL 中运行)
144
151
  ./build_wheel.sh
145
152
 
146
153
  # 安装生成的 wheel
147
154
  pip install target/wheels/rsplotlib-*.whl
148
155
  ```
149
156
 
150
- ### 方法三:仅编译 Rust 扩展(调试用)
157
+ ### 方法四:仅编译 Rust 扩展(调试用)
151
158
 
152
159
  ```bash
153
160
  # 编译 Rust cdylib
@@ -385,19 +392,19 @@ plt.savefig('module_level.png')
385
392
 
386
393
  ### 图表配置
387
394
 
388
- | 函数 | 说明 |
389
- | -------------------------------------- | -------------------------------- |
390
- | `title()` / `ax.set_title()` | 设置图表标题 |
391
- | `xlabel()` / `ax.set_xlabel()` | 设置 X 轴标签 |
392
- | `ylabel()` / `ax.set_ylabel()` | 设置 Y 轴标签 |
393
- | `grid()` | 显示/隐藏网格 |
394
- | `legend()` | 显示图例 |
395
- | `xlim()` / `ylim()` | 设置坐标轴范围 |
396
- | `xticks()` / `yticks()` | 设置刻度位置和标签 |
397
- | `xscale()` / `yscale()` | 设置坐标缩放(`linear` / `log`) |
398
- | `margins()` | 设置自动缩放边距 |
399
- | `box()` | 设置坐标轴边框显示 |
400
- | `minorticks_on()` / `minorticks_off()` | 次要刻度显示控制 |
395
+ | 函数 | 说明 |
396
+ | -------------------------------------- | ---------------------------------------------- |
397
+ | `title()` / `ax.set_title()` | 设置图表标题(`loc='left'/'center'/'right'`) |
398
+ | `xlabel()` / `ax.set_xlabel()` | 设置 X 轴标签(`loc='left'/'center'/'right'`) |
399
+ | `ylabel()` / `ax.set_ylabel()` | 设置 Y 轴标签(`loc='top'/'center'/'bottom'`) |
400
+ | `grid()` | 显示/隐藏网格 |
401
+ | `legend()` | 显示图例 |
402
+ | `xlim()` / `ylim()` | 设置坐标轴范围 |
403
+ | `xticks()` / `yticks()` | 设置刻度位置和标签 |
404
+ | `xscale()` / `yscale()` | 设置坐标缩放(`linear` / `log`) |
405
+ | `margins()` | 设置自动缩放边距 |
406
+ | `box()` | 设置坐标轴边框显示 |
407
+ | `minorticks_on()` / `minorticks_off()` | 次要刻度显示控制 |
401
408
 
402
409
  ### 子图与布局
403
410
 
@@ -768,10 +775,8 @@ MIT License — 详见 [LICENSE](LICENSE) 文件。
768
775
  ## 相关链接
769
776
 
770
777
  - **GitHub**: https://github.com/YJ-Niu/rsplotlib
771
- - **PyPI**: (待发布)
772
- - **文档**: (待完善)
773
778
 
774
779
  ---
775
780
 
776
- _最后更新:2026-06-17 · 版本 v0.1.5_
781
+ _最后更新:2026-07-03 · 版本 v0.1.9_
777
782