matplotlib-rs 0.0.8__cp313-cp313-win_amd64.whl
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.
- docs/releases/0.0.1.md +268 -0
- docs/releases/0.0.2.md +69 -0
- docs/releases/0.0.3.md +80 -0
- docs/releases/0.0.4.md +73 -0
- docs/releases/0.0.5.md +24 -0
- docs/releases/0.0.6.md +24 -0
- docs/releases/0.0.7.md +24 -0
- docs/releases/0.0.8.md +16 -0
- licenses/LICENSE_CONTOURPY +29 -0
- licenses/LICENSE_CYCLER +27 -0
- licenses/LICENSE_DATEUTIL +54 -0
- licenses/LICENSE_KIWISOLVER +71 -0
- licenses/LICENSE_LIBWEBP +56 -0
- licenses/LICENSE_MATPLOTLIB +1253 -0
- licenses/LICENSE_PYPARSING +20 -0
- licenses/LICENSE_QHULL +39 -0
- licenses/LICENSE_SIX +18 -0
- matplotlib_rs/__init__.py +1683 -0
- matplotlib_rs/__main__.py +27 -0
- matplotlib_rs/_afm.py +500 -0
- matplotlib_rs/_animation_data.py +263 -0
- matplotlib_rs/_api/__init__.py +495 -0
- matplotlib_rs/_api/deprecation.py +534 -0
- matplotlib_rs/_axis_py.py +2991 -0
- matplotlib_rs/_blocking_input.py +31 -0
- matplotlib_rs/_cm.py +1500 -0
- matplotlib_rs/_cm_bivar.py +1289 -0
- matplotlib_rs/_cm_listed.py +2848 -0
- matplotlib_rs/_cm_multivar.py +167 -0
- matplotlib_rs/_color_data.py +1142 -0
- matplotlib_rs/_colormap.py +132 -0
- matplotlib_rs/_constrained_layout.py +825 -0
- matplotlib_rs/_contour.py +108 -0
- matplotlib_rs/_doc_cache.py +12214 -0
- matplotlib_rs/_docstring.py +142 -0
- matplotlib_rs/_enums.py +178 -0
- matplotlib_rs/_figure_rs.py +294 -0
- matplotlib_rs/_fontconfig_pattern.py +129 -0
- matplotlib_rs/_foreign.py +220 -0
- matplotlib_rs/_hook.py +94 -0
- matplotlib_rs/_image.py +160 -0
- matplotlib_rs/_imageio.py +229 -0
- matplotlib_rs/_internal_utils.py +65 -0
- matplotlib_rs/_kiwi.py +484 -0
- matplotlib_rs/_layoutgrid.py +549 -0
- matplotlib_rs/_live.py +192 -0
- matplotlib_rs/_mathtext.py +3103 -0
- matplotlib_rs/_mathtext_data.py +1811 -0
- matplotlib_rs/_mplrs.cp313-win_amd64.pyd +0 -0
- matplotlib_rs/_path.py +25 -0
- matplotlib_rs/_png.py +162 -0
- matplotlib_rs/_pylab_helpers.py +137 -0
- matplotlib_rs/_qhull.py +66 -0
- matplotlib_rs/_rcpush.py +84 -0
- matplotlib_rs/_spines_rs.py +108 -0
- matplotlib_rs/_style_helpers.py +52 -0
- matplotlib_rs/_text_helpers.py +51 -0
- matplotlib_rs/_tight_bbox.py +85 -0
- matplotlib_rs/_tight_layout.py +302 -0
- matplotlib_rs/_tri.py +140 -0
- matplotlib_rs/_type1font.py +1228 -0
- matplotlib_rs/_vendor/__init__.py +8 -0
- matplotlib_rs/_vendor/cycler.py +574 -0
- matplotlib_rs/_vendor/dateutil/__init__.py +27 -0
- matplotlib_rs/_vendor/dateutil/_common.py +44 -0
- matplotlib_rs/_vendor/dateutil/_tzdata_impl.py +148 -0
- matplotlib_rs/_vendor/dateutil/_version.py +5 -0
- matplotlib_rs/_vendor/dateutil/easter.py +90 -0
- matplotlib_rs/_vendor/dateutil/parser/__init__.py +62 -0
- matplotlib_rs/_vendor/dateutil/parser/_parser.py +1614 -0
- matplotlib_rs/_vendor/dateutil/parser/isoparser.py +417 -0
- matplotlib_rs/_vendor/dateutil/relativedelta.py +597 -0
- matplotlib_rs/_vendor/dateutil/rrule.py +1765 -0
- matplotlib_rs/_vendor/dateutil/tz/__init__.py +61 -0
- matplotlib_rs/_vendor/dateutil/tz/_common.py +420 -0
- matplotlib_rs/_vendor/dateutil/tz/_factories.py +81 -0
- matplotlib_rs/_vendor/dateutil/tz/_tzfile.py +1429 -0
- matplotlib_rs/_vendor/dateutil/tz/_tzpath.py +105 -0
- matplotlib_rs/_vendor/dateutil/tz/tz.py +1473 -0
- matplotlib_rs/_vendor/dateutil/tz/win.py +371 -0
- matplotlib_rs/_vendor/dateutil/tzwin.py +3 -0
- matplotlib_rs/_vendor/dateutil/utils.py +72 -0
- matplotlib_rs/_vendor/dateutil/zoneinfo/__init__.py +234 -0
- matplotlib_rs/_vendor/pyparsing/__init__.py +414 -0
- matplotlib_rs/_vendor/pyparsing/actions.py +265 -0
- matplotlib_rs/_vendor/pyparsing/common.py +571 -0
- matplotlib_rs/_vendor/pyparsing/core.py +6973 -0
- matplotlib_rs/_vendor/pyparsing/exceptions.py +354 -0
- matplotlib_rs/_vendor/pyparsing/helpers.py +1770 -0
- matplotlib_rs/_vendor/pyparsing/results.py +929 -0
- matplotlib_rs/_vendor/pyparsing/testing.py +399 -0
- matplotlib_rs/_vendor/pyparsing/unicode.py +357 -0
- matplotlib_rs/_vendor/pyparsing/util.py +515 -0
- matplotlib_rs/_vendor/pyparsing/warnings.py +11 -0
- matplotlib_rs/_vendor/six.py +1004 -0
- matplotlib_rs/animation.py +1843 -0
- matplotlib_rs/artist.py +2302 -0
- matplotlib_rs/axes/__init__.py +19 -0
- matplotlib_rs/axes/_axes.py +9402 -0
- matplotlib_rs/axes/_bar.py +185 -0
- matplotlib_rs/axes/_base.py +5236 -0
- matplotlib_rs/axes/_base_rs.py +727 -0
- matplotlib_rs/axes/_boxplot.py +391 -0
- matplotlib_rs/axes/_hist.py +99 -0
- matplotlib_rs/axes/_secondary_axes.py +357 -0
- matplotlib_rs/axis.py +1963 -0
- matplotlib_rs/backend_bases.py +3760 -0
- matplotlib_rs/backend_managers.py +388 -0
- matplotlib_rs/backend_tools.py +1002 -0
- matplotlib_rs/backends/__init__.py +6 -0
- matplotlib_rs/backends/_backend_pdf_ps.py +451 -0
- matplotlib_rs/backends/backend_agg.py +552 -0
- matplotlib_rs/backends/backend_mixed.py +123 -0
- matplotlib_rs/backends/backend_pdf.py +2711 -0
- matplotlib_rs/backends/backend_pgf.py +1031 -0
- matplotlib_rs/backends/backend_ps.py +1491 -0
- matplotlib_rs/backends/backend_svg.py +1395 -0
- matplotlib_rs/backends/backend_template.py +214 -0
- matplotlib_rs/backends/registry.py +423 -0
- matplotlib_rs/bezier.py +691 -0
- matplotlib_rs/category.py +236 -0
- matplotlib_rs/cbook.py +2762 -0
- matplotlib_rs/cm.py +251 -0
- matplotlib_rs/collections.py +2711 -0
- matplotlib_rs/colorbar.py +1586 -0
- matplotlib_rs/colorizer.py +909 -0
- matplotlib_rs/colors.py +4278 -0
- matplotlib_rs/container.py +256 -0
- matplotlib_rs/contour.py +1756 -0
- matplotlib_rs/dates.py +1847 -0
- matplotlib_rs/dviread.py +1386 -0
- matplotlib_rs/figure.py +3815 -0
- matplotlib_rs/font_manager.py +1855 -0
- matplotlib_rs/ft2font.py +515 -0
- matplotlib_rs/gridspec.py +808 -0
- matplotlib_rs/hatch.py +244 -0
- matplotlib_rs/image.py +1863 -0
- matplotlib_rs/inset.py +291 -0
- matplotlib_rs/layout_engine.py +310 -0
- matplotlib_rs/legend.py +1480 -0
- matplotlib_rs/legend_handler.py +812 -0
- matplotlib_rs/lines.py +1886 -0
- matplotlib_rs/markers.py +908 -0
- matplotlib_rs/mathtext.py +141 -0
- matplotlib_rs/mlab.py +959 -0
- matplotlib_rs/mpl-data/fonts/ttf/DejaVuSans-Bold.ttf +0 -0
- matplotlib_rs/mpl-data/fonts/ttf/DejaVuSans-BoldOblique.ttf +0 -0
- matplotlib_rs/mpl-data/fonts/ttf/DejaVuSans-Oblique.ttf +0 -0
- matplotlib_rs/mpl-data/fonts/ttf/DejaVuSans.ttf +0 -0
- matplotlib_rs/mpl-data/fonts/ttf/DejaVuSansDisplay.ttf +0 -0
- matplotlib_rs/mpl-data/fonts/ttf/DejaVuSansMono-Bold.ttf +0 -0
- matplotlib_rs/mpl-data/fonts/ttf/DejaVuSansMono-BoldOblique.ttf +0 -0
- matplotlib_rs/mpl-data/fonts/ttf/DejaVuSansMono-Oblique.ttf +0 -0
- matplotlib_rs/mpl-data/fonts/ttf/DejaVuSansMono.ttf +0 -0
- matplotlib_rs/mpl-data/fonts/ttf/DejaVuSerif-Bold.ttf +0 -0
- matplotlib_rs/mpl-data/fonts/ttf/DejaVuSerif-BoldItalic.ttf +0 -0
- matplotlib_rs/mpl-data/fonts/ttf/DejaVuSerif-Italic.ttf +0 -0
- matplotlib_rs/mpl-data/fonts/ttf/DejaVuSerif.ttf +0 -0
- matplotlib_rs/mpl-data/fonts/ttf/DejaVuSerifDisplay.ttf +0 -0
- matplotlib_rs/mpl-data/fonts/ttf/LICENSE_DEJAVU +99 -0
- matplotlib_rs/mpl-data/fonts/ttf/LICENSE_STIX +124 -0
- matplotlib_rs/mpl-data/fonts/ttf/LastResortHE-Regular.ttf +0 -0
- matplotlib_rs/mpl-data/fonts/ttf/STIXGeneral.ttf +0 -0
- matplotlib_rs/mpl-data/fonts/ttf/STIXGeneralBol.ttf +0 -0
- matplotlib_rs/mpl-data/fonts/ttf/STIXGeneralBolIta.ttf +0 -0
- matplotlib_rs/mpl-data/fonts/ttf/STIXGeneralItalic.ttf +0 -0
- matplotlib_rs/mpl-data/fonts/ttf/STIXNonUni.ttf +0 -0
- matplotlib_rs/mpl-data/fonts/ttf/STIXNonUniBol.ttf +0 -0
- matplotlib_rs/mpl-data/fonts/ttf/STIXNonUniBolIta.ttf +0 -0
- matplotlib_rs/mpl-data/fonts/ttf/STIXNonUniIta.ttf +0 -0
- matplotlib_rs/mpl-data/fonts/ttf/STIXSizFiveSymReg.ttf +0 -0
- matplotlib_rs/mpl-data/fonts/ttf/STIXSizFourSymBol.ttf +0 -0
- matplotlib_rs/mpl-data/fonts/ttf/STIXSizFourSymReg.ttf +0 -0
- matplotlib_rs/mpl-data/fonts/ttf/STIXSizOneSymBol.ttf +0 -0
- matplotlib_rs/mpl-data/fonts/ttf/STIXSizOneSymReg.ttf +0 -0
- matplotlib_rs/mpl-data/fonts/ttf/STIXSizThreeSymBol.ttf +0 -0
- matplotlib_rs/mpl-data/fonts/ttf/STIXSizThreeSymReg.ttf +0 -0
- matplotlib_rs/mpl-data/fonts/ttf/STIXSizTwoSymBol.ttf +0 -0
- matplotlib_rs/mpl-data/fonts/ttf/STIXSizTwoSymReg.ttf +0 -0
- matplotlib_rs/mpl-data/fonts/ttf/cmb10.ttf +0 -0
- matplotlib_rs/mpl-data/fonts/ttf/cmex10.ttf +0 -0
- matplotlib_rs/mpl-data/fonts/ttf/cmmi10.ttf +0 -0
- matplotlib_rs/mpl-data/fonts/ttf/cmr10.ttf +0 -0
- matplotlib_rs/mpl-data/fonts/ttf/cmss10.ttf +0 -0
- matplotlib_rs/mpl-data/fonts/ttf/cmsy10.ttf +0 -0
- matplotlib_rs/mpl-data/fonts/ttf/cmti10.ttf +0 -0
- matplotlib_rs/mpl-data/fonts/ttf/cmtt10.ttf +0 -0
- matplotlib_rs/mpl-data/images/back-symbolic.svg +46 -0
- matplotlib_rs/mpl-data/images/back.pdf +0 -0
- matplotlib_rs/mpl-data/images/back.png +0 -0
- matplotlib_rs/mpl-data/images/back.svg +46 -0
- matplotlib_rs/mpl-data/images/back_large.png +0 -0
- matplotlib_rs/mpl-data/images/filesave-symbolic.svg +68 -0
- matplotlib_rs/mpl-data/images/filesave.pdf +72 -0
- matplotlib_rs/mpl-data/images/filesave.png +0 -0
- matplotlib_rs/mpl-data/images/filesave.svg +68 -0
- matplotlib_rs/mpl-data/images/filesave_large.png +0 -0
- matplotlib_rs/mpl-data/images/forward-symbolic.svg +46 -0
- matplotlib_rs/mpl-data/images/forward.pdf +0 -0
- matplotlib_rs/mpl-data/images/forward.png +0 -0
- matplotlib_rs/mpl-data/images/forward.svg +46 -0
- matplotlib_rs/mpl-data/images/forward_large.png +0 -0
- matplotlib_rs/mpl-data/images/hand.pdf +0 -0
- matplotlib_rs/mpl-data/images/hand.png +0 -0
- matplotlib_rs/mpl-data/images/hand.svg +130 -0
- matplotlib_rs/mpl-data/images/help-symbolic.svg +52 -0
- matplotlib_rs/mpl-data/images/help.pdf +71 -0
- matplotlib_rs/mpl-data/images/help.png +0 -0
- matplotlib_rs/mpl-data/images/help.svg +52 -0
- matplotlib_rs/mpl-data/images/help_large.png +0 -0
- matplotlib_rs/mpl-data/images/home-symbolic.svg +59 -0
- matplotlib_rs/mpl-data/images/home.pdf +0 -0
- matplotlib_rs/mpl-data/images/home.png +0 -0
- matplotlib_rs/mpl-data/images/home.svg +59 -0
- matplotlib_rs/mpl-data/images/home_large.png +0 -0
- matplotlib_rs/mpl-data/images/matplotlib.pdf +0 -0
- matplotlib_rs/mpl-data/images/matplotlib.png +0 -0
- matplotlib_rs/mpl-data/images/matplotlib.svg +3171 -0
- matplotlib_rs/mpl-data/images/matplotlib_large.png +0 -0
- matplotlib_rs/mpl-data/images/move-symbolic.svg +73 -0
- matplotlib_rs/mpl-data/images/move.pdf +0 -0
- matplotlib_rs/mpl-data/images/move.png +0 -0
- matplotlib_rs/mpl-data/images/move.svg +73 -0
- matplotlib_rs/mpl-data/images/move_large.png +0 -0
- matplotlib_rs/mpl-data/images/qt4_editor_options.pdf +0 -0
- matplotlib_rs/mpl-data/images/qt4_editor_options.png +0 -0
- matplotlib_rs/mpl-data/images/qt4_editor_options.svg +48 -0
- matplotlib_rs/mpl-data/images/qt4_editor_options_large.png +0 -0
- matplotlib_rs/mpl-data/images/subplots-symbolic.svg +81 -0
- matplotlib_rs/mpl-data/images/subplots.pdf +0 -0
- matplotlib_rs/mpl-data/images/subplots.png +0 -0
- matplotlib_rs/mpl-data/images/subplots.svg +81 -0
- matplotlib_rs/mpl-data/images/subplots_large.png +0 -0
- matplotlib_rs/mpl-data/images/zoom_to_rect-symbolic.svg +40 -0
- matplotlib_rs/mpl-data/images/zoom_to_rect.pdf +69 -0
- matplotlib_rs/mpl-data/images/zoom_to_rect.png +0 -0
- matplotlib_rs/mpl-data/images/zoom_to_rect.svg +40 -0
- matplotlib_rs/mpl-data/images/zoom_to_rect_large.png +0 -0
- matplotlib_rs/mpl-data/kpsewhich.lua +4 -0
- matplotlib_rs/mpl-data/matplotlibrc +849 -0
- matplotlib_rs/mpl-data/plot_directive/plot_directive.css +16 -0
- matplotlib_rs/mpl-data/sample_data/Minduka_Present_Blue_Pack.png +0 -0
- matplotlib_rs/mpl-data/sample_data/README.txt +2 -0
- matplotlib_rs/mpl-data/sample_data/Stocks.csv +526 -0
- matplotlib_rs/mpl-data/sample_data/axes_grid/bivariate_normal.npy +0 -0
- matplotlib_rs/mpl-data/sample_data/data_x_x2_x3.csv +11 -0
- matplotlib_rs/mpl-data/sample_data/eeg.dat +0 -0
- matplotlib_rs/mpl-data/sample_data/embedding_in_wx3.xrc +65 -0
- matplotlib_rs/mpl-data/sample_data/goog.npz +0 -0
- matplotlib_rs/mpl-data/sample_data/grace_hopper.jpg +0 -0
- matplotlib_rs/mpl-data/sample_data/jacksboro_fault_dem.npz +0 -0
- matplotlib_rs/mpl-data/sample_data/logo2.png +0 -0
- matplotlib_rs/mpl-data/sample_data/membrane.dat +0 -0
- matplotlib_rs/mpl-data/sample_data/msft.csv +66 -0
- matplotlib_rs/mpl-data/sample_data/s1045.ima.gz +0 -0
- matplotlib_rs/mpl-data/sample_data/topobathy.npz +0 -0
- matplotlib_rs/mpl-data/stylelib/Solarize_Light2.mplstyle +53 -0
- matplotlib_rs/mpl-data/stylelib/_classic_test_patch.mplstyle +8 -0
- matplotlib_rs/mpl-data/stylelib/_mpl-gallery-nogrid.mplstyle +19 -0
- matplotlib_rs/mpl-data/stylelib/_mpl-gallery.mplstyle +19 -0
- matplotlib_rs/mpl-data/stylelib/bmh.mplstyle +27 -0
- matplotlib_rs/mpl-data/stylelib/classic.mplstyle +491 -0
- matplotlib_rs/mpl-data/stylelib/dark_background.mplstyle +26 -0
- matplotlib_rs/mpl-data/stylelib/fast.mplstyle +11 -0
- matplotlib_rs/mpl-data/stylelib/fivethirtyeight.mplstyle +37 -0
- matplotlib_rs/mpl-data/stylelib/ggplot.mplstyle +39 -0
- matplotlib_rs/mpl-data/stylelib/grayscale.mplstyle +29 -0
- matplotlib_rs/mpl-data/stylelib/petroff10.mplstyle +5 -0
- matplotlib_rs/mpl-data/stylelib/petroff6.mplstyle +5 -0
- matplotlib_rs/mpl-data/stylelib/petroff8.mplstyle +5 -0
- matplotlib_rs/mpl-data/stylelib/seaborn-v0_8-bright.mplstyle +3 -0
- matplotlib_rs/mpl-data/stylelib/seaborn-v0_8-colorblind.mplstyle +3 -0
- matplotlib_rs/mpl-data/stylelib/seaborn-v0_8-dark-palette.mplstyle +3 -0
- matplotlib_rs/mpl-data/stylelib/seaborn-v0_8-dark.mplstyle +30 -0
- matplotlib_rs/mpl-data/stylelib/seaborn-v0_8-darkgrid.mplstyle +30 -0
- matplotlib_rs/mpl-data/stylelib/seaborn-v0_8-deep.mplstyle +3 -0
- matplotlib_rs/mpl-data/stylelib/seaborn-v0_8-muted.mplstyle +3 -0
- matplotlib_rs/mpl-data/stylelib/seaborn-v0_8-notebook.mplstyle +21 -0
- matplotlib_rs/mpl-data/stylelib/seaborn-v0_8-paper.mplstyle +21 -0
- matplotlib_rs/mpl-data/stylelib/seaborn-v0_8-pastel.mplstyle +3 -0
- matplotlib_rs/mpl-data/stylelib/seaborn-v0_8-poster.mplstyle +21 -0
- matplotlib_rs/mpl-data/stylelib/seaborn-v0_8-talk.mplstyle +21 -0
- matplotlib_rs/mpl-data/stylelib/seaborn-v0_8-ticks.mplstyle +30 -0
- matplotlib_rs/mpl-data/stylelib/seaborn-v0_8-white.mplstyle +30 -0
- matplotlib_rs/mpl-data/stylelib/seaborn-v0_8-whitegrid.mplstyle +30 -0
- matplotlib_rs/mpl-data/stylelib/seaborn-v0_8.mplstyle +57 -0
- matplotlib_rs/mpl-data/stylelib/tableau-colorblind10.mplstyle +3 -0
- matplotlib_rs/mpl_toolkits/__init__.py +3 -0
- matplotlib_rs/mpl_toolkits/axes_grid1/__init__.py +11 -0
- matplotlib_rs/mpl_toolkits/axes_grid1/anchored_artists.py +415 -0
- matplotlib_rs/mpl_toolkits/axes_grid1/axes_divider.py +619 -0
- matplotlib_rs/mpl_toolkits/axes_grid1/axes_grid.py +565 -0
- matplotlib_rs/mpl_toolkits/axes_grid1/axes_rgb.py +158 -0
- matplotlib_rs/mpl_toolkits/axes_grid1/axes_size.py +272 -0
- matplotlib_rs/mpl_toolkits/axes_grid1/inset_locator.py +525 -0
- matplotlib_rs/mpl_toolkits/axes_grid1/mpl_axes.py +129 -0
- matplotlib_rs/mpl_toolkits/axes_grid1/parasite_axes.py +261 -0
- matplotlib_rs/mpl_toolkits/axisartist/__init__.py +15 -0
- matplotlib_rs/mpl_toolkits/axisartist/angle_helper.py +396 -0
- matplotlib_rs/mpl_toolkits/axisartist/axes_divider.py +3 -0
- matplotlib_rs/mpl_toolkits/axisartist/axis_artist.py +1148 -0
- matplotlib_rs/mpl_toolkits/axisartist/axisline_style.py +193 -0
- matplotlib_rs/mpl_toolkits/axisartist/axislines.py +475 -0
- matplotlib_rs/mpl_toolkits/axisartist/floating_axes.py +265 -0
- matplotlib_rs/mpl_toolkits/axisartist/grid_finder.py +329 -0
- matplotlib_rs/mpl_toolkits/axisartist/grid_helper_curvelinear.py +353 -0
- matplotlib_rs/mpl_toolkits/axisartist/parasite_axes.py +8 -0
- matplotlib_rs/mpl_toolkits/mplot3d/__init__.py +4 -0
- matplotlib_rs/mpl_toolkits/mplot3d/art3d.py +1758 -0
- matplotlib_rs/mpl_toolkits/mplot3d/axes3d.py +4462 -0
- matplotlib_rs/mpl_toolkits/mplot3d/axis3d.py +807 -0
- matplotlib_rs/mpl_toolkits/mplot3d/proj3d.py +270 -0
- matplotlib_rs/offsetbox.py +1726 -0
- matplotlib_rs/patches.py +5049 -0
- matplotlib_rs/path.py +1147 -0
- matplotlib_rs/patheffects.py +512 -0
- matplotlib_rs/projections/__init__.py +126 -0
- matplotlib_rs/projections/geo.py +512 -0
- matplotlib_rs/projections/polar.py +1518 -0
- matplotlib_rs/pylab.py +68 -0
- matplotlib_rs/pyplot.py +4834 -0
- matplotlib_rs/quiver.py +1236 -0
- matplotlib_rs/rcsetup.py +3435 -0
- matplotlib_rs/sankey.py +815 -0
- matplotlib_rs/scale.py +1002 -0
- matplotlib_rs/spines.py +618 -0
- matplotlib_rs/stackplot.py +144 -0
- matplotlib_rs/streamplot.py +768 -0
- matplotlib_rs/style/__init__.py +269 -0
- matplotlib_rs/style/core.py +28 -0
- matplotlib_rs/table.py +860 -0
- matplotlib_rs/texmanager.py +375 -0
- matplotlib_rs/text.py +2412 -0
- matplotlib_rs/textpath.py +377 -0
- matplotlib_rs/ticker.py +3111 -0
- matplotlib_rs/transforms.py +3069 -0
- matplotlib_rs/tri/__init__.py +24 -0
- matplotlib_rs/tri/_triangulation.py +248 -0
- matplotlib_rs/tri/_tricontour.py +271 -0
- matplotlib_rs/tri/_trifinder.py +97 -0
- matplotlib_rs/tri/_triinterpolate.py +1575 -0
- matplotlib_rs/tri/_tripcolor.py +170 -0
- matplotlib_rs/tri/_triplot.py +87 -0
- matplotlib_rs/tri/_trirefine.py +308 -0
- matplotlib_rs/tri/_tritools.py +264 -0
- matplotlib_rs/typing.py +597 -0
- matplotlib_rs/units.py +196 -0
- matplotlib_rs/widgets.py +4455 -0
- matplotlib_rs-0.0.8.dist-info/METADATA +392 -0
- matplotlib_rs-0.0.8.dist-info/RECORD +352 -0
- matplotlib_rs-0.0.8.dist-info/WHEEL +4 -0
- matplotlib_rs-0.0.8.dist-info/sboms/matplotlib-rs.cyclonedx.json +4390 -0
docs/releases/0.0.1.md
ADDED
|
@@ -0,0 +1,268 @@
|
|
|
1
|
+
# 0.0.1 驗證報告
|
|
2
|
+
|
|
3
|
+
測試日期:2026-10-26(Asia/Taipei)。本次以 `73ca63a43b62f755f5343c0e29896e09c80f571a`
|
|
4
|
+
的繪圖核心為基準,另整理發行版本、安裝依賴、文件與測試工具。
|
|
5
|
+
|
|
6
|
+
## 測試環境
|
|
7
|
+
|
|
8
|
+
| 項目 | 版本/設定 |
|
|
9
|
+
| --- | --- |
|
|
10
|
+
| OS | Linux x86_64,glibc 2.41 |
|
|
11
|
+
| CPU | Intel Xeon Platinum 8573C;3 個可見 CPU,容器 CPU quota 為 2 核 |
|
|
12
|
+
| Python | CPython 3.12.14 |
|
|
13
|
+
| Rust/maturin | rustc 1.99.1/maturin 1.15.0 |
|
|
14
|
+
| 參考實作 | Matplotlib 3.11.2 |
|
|
15
|
+
| NumPy/Pillow | 2.3.5/13.0.0 |
|
|
16
|
+
| ContourPy/Kiwi | 1.4.0/1.5.1 |
|
|
17
|
+
| 其他主要套件 | cycler 0.12.1、fonttools 4.67.0、packaging 26.3、pyparsing 3.3.3、python-dateutil 3.0.0 |
|
|
18
|
+
| 編譯 | release,opt-level=3、fat LTO、codegen-units=1,使用 Cargo.lock |
|
|
19
|
+
| 繪圖 | Agg;專案 `tests/mplrc/matplotlibrc` |
|
|
20
|
+
|
|
21
|
+
`environment.json` 與完整原始紀錄已整理至 `matplotlib-rs-0.0.1-validation.zip`。
|
|
22
|
+
GitHub 附件上傳端點回傳 HTTP 401,wheel、sdist、validation ZIP 與 SHA256SUMS
|
|
23
|
+
目前保留於本次工作區的 `dist/`,尚未附至發行頁;GitHub release 可下載原始碼。
|
|
24
|
+
正式量測前已建立字型快取;所有效能數值均限定於上述環境與工作負載。
|
|
25
|
+
|
|
26
|
+
## 專案內完整測試
|
|
27
|
+
|
|
28
|
+
已執行所有 `tests/unit/test_*.py`、`tests/lowlevel/diff_*.py`、原生模型案例、
|
|
29
|
+
`tests/compare/cases/*.py`,以及 Rust 單元測試與 doctest 探索。
|
|
30
|
+
這裡的完整測試指本專案的測試集合;官方 gallery 是額外的相容性檢查,
|
|
31
|
+
並未執行 Matplotlib 上游完整 pytest 測試集合。
|
|
32
|
+
|
|
33
|
+
| 測試 | 結果 |
|
|
34
|
+
| --- | --- |
|
|
35
|
+
| Rust `mt19937_reference` | 1 通過、0 失敗;doctest 0 個 |
|
|
36
|
+
| `test_tri.py` | 1,015/1,015 完全一致 |
|
|
37
|
+
| `test_resample.py` | 6,800/6,800 完全一致 |
|
|
38
|
+
| `test_doc_cache.py` | 124 個類別,stale=[] |
|
|
39
|
+
| `diff_renderer.py` | 300 次隨機迭代,0 失敗;257 次產生可見內容 |
|
|
40
|
+
| `diff_font.py` | 2,016 次 TTF glyph render,0 失敗;同時比較文字度量與排版 |
|
|
41
|
+
| `diff_font_cff.py` | 35 個 OTF 字型、85,827 個 glyph 比較,0 失敗 |
|
|
42
|
+
| `diff_ft2font_api.py` | 480 個主機字型,0 失敗 |
|
|
43
|
+
| `tests/model/first_plot.py` | 640 × 480 RGBA,0 個差異像素 |
|
|
44
|
+
|
|
45
|
+
字型測試數量取決於執行主機安裝的字型。Renderer 使用預設 seed=0、300 次迭代;
|
|
46
|
+
這些是具體的差異測試樣本數,不代表所有字型、隨機種子或輸入的窮舉驗證。
|
|
47
|
+
|
|
48
|
+
## 自有繪圖與輸出格式
|
|
49
|
+
|
|
50
|
+
共 **57 個繪圖案例**。PNG 比較 RGBA 像素,必須完全相同;
|
|
51
|
+
向量輸出固定 `SOURCE_DATE_EPOCH=0` 與 `svg.hashsalt`,
|
|
52
|
+
僅忽略 PostScript `%%Title:` 的輸出檔名行,其他內容必須完全相同。
|
|
53
|
+
另檢查兩側輸出檔名集合,沒有缺漏或多出的檔案。
|
|
54
|
+
|
|
55
|
+
| 格式 | 完全一致/總數 | 通過率 |
|
|
56
|
+
| --- | --- | --- |
|
|
57
|
+
| PNG | 69/69 張,涵蓋 57/57 案例 | 100% |
|
|
58
|
+
| SVG | 66/66 份 | 100% |
|
|
59
|
+
| PDF | 66/66 份 | 100% |
|
|
60
|
+
| EPS | 65/66 份 | 98.48% |
|
|
61
|
+
| 四種格式同時符合的案例 | 56/57 | 98.25% |
|
|
62
|
+
|
|
63
|
+
嚴格全格式比較的退出碼為 **1**,原因是 `polar_more.eps` 的裁切路徑快取定義及編號不同。
|
|
64
|
+
額外使用 Ghostscript **10.05.1**、`pngalpha`、`-r100 -dEPSCrop` 將兩份 EPS 轉為 PNG,
|
|
65
|
+
兩張圖像逐像素一致。這項補充檢查僅證實該檔案在此渲染設定下的結果;
|
|
66
|
+
原始 EPS 內容比較仍保留失敗結果。
|
|
67
|
+
|
|
68
|
+
功能範圍包含基本統計圖、線條與 marker、影像與 mesh、等高線與三角網格、
|
|
69
|
+
日期與比例尺、polar/3D、subfigures/layout/toolkits、文字與字型、
|
|
70
|
+
clip paths/blitting/rasterization。具體案例見 [`tests/compare/cases`](../../tests/compare/cases)。
|
|
71
|
+
|
|
72
|
+
## 官方 gallery 全量檢查
|
|
73
|
+
|
|
74
|
+
使用 Matplotlib **v3.11.2** 原始碼的 `galleries` 目錄,共 **581 支 Python 腳本**,
|
|
75
|
+
包括 examples、plot_types、tutorials 與 users_explain。每支腳本各自啟動參考實作與 Rust 實作,
|
|
76
|
+
強制 Agg 並將 `plt.show()` 替換成空函式,最後儲存尚未關閉的 figures,再逐像素比較 PNG。
|
|
77
|
+
|
|
78
|
+
| 結果 | 腳本數 |
|
|
79
|
+
| --- | --- |
|
|
80
|
+
| 有 PNG 且逐像素一致 | 508 |
|
|
81
|
+
| 成功執行但未留下 figure | 8 |
|
|
82
|
+
| DIFF:有像素差異 | 36 |
|
|
83
|
+
| ERR:Rust 實作執行錯誤 | 0 |
|
|
84
|
+
| SKIP:參考實作未能完成 | 29 |
|
|
85
|
+
| 合計 | 581 |
|
|
86
|
+
|
|
87
|
+
有圖可驗證且參考端可執行的案例,PNG 完全一致率為 **508/544 = 93.38%**。
|
|
88
|
+
8 支無圖腳本與 29 支略過腳本未納入此分母。原始全量紀錄為 516 OK、35 DIFF、30 SKIP;
|
|
89
|
+
將 `plot_streamplot.py` 的 timeout 提高至 180 秒重跑後,改列 DIFF,因此最終為 36 DIFF、29 SKIP。
|
|
90
|
+
`parasite_simple.py` 亦重跑確認其差異,並確認修正後的 gallery runner 會以退出碼 1 回報 DIFF。
|
|
91
|
+
|
|
92
|
+
`plot_streamplot.py` 會把實測執行秒數畫入第二張圖;該圖的 241 個差異像素不能單獨歸因於繪圖核心。
|
|
93
|
+
其他 DIFF 仍按原始像素比較列出,尚未逐項判定成因。
|
|
94
|
+
|
|
95
|
+
### 差異案例
|
|
96
|
+
|
|
97
|
+
| Gallery 腳本 | 原始比較訊息 |
|
|
98
|
+
| --- | --- |
|
|
99
|
+
| `examples/axes_grid1/demo_axes_rgb.py` | fig1.png 636px; fig2.png 1079px |
|
|
100
|
+
| `examples/axes_grid1/demo_imagegrid_aspect.py` | fig1.png 1208px |
|
|
101
|
+
| `examples/axes_grid1/make_room_for_ylabel_using_axesgrid.py` | fig2.png 8805px; fig3.png 8525px |
|
|
102
|
+
| `examples/axes_grid1/parasite_simple.py` | fig1.png 4732px |
|
|
103
|
+
| `examples/axes_grid1/parasite_simple2.py` | fig1.png 4309px |
|
|
104
|
+
| `examples/axes_grid1/simple_axisline4.py` | fig1.png 3202px |
|
|
105
|
+
| `examples/images_contours_and_fields/colormap_normalizations.py` | fig4.png 1324px |
|
|
106
|
+
| `examples/images_contours_and_fields/image_annotated_heatmap.py` | fig2.png 155203px; fig3.png 234188px |
|
|
107
|
+
| `examples/images_contours_and_fields/plot_streamplot.py` | fig2.png 241px |
|
|
108
|
+
| `examples/lines_bars_and_markers/broken_barh.py` | fig1.png 7751px |
|
|
109
|
+
| `examples/lines_bars_and_markers/scatter_with_legend.py` | fig2.png 2803px; fig3.png 2567px |
|
|
110
|
+
| `examples/misc/custom_projection.py` | fig1.png 19011px |
|
|
111
|
+
| `examples/misc/customize_rc.py` | fig1.png 4189px |
|
|
112
|
+
| `examples/misc/patheffect_demo.py` | fig1.png 6320px |
|
|
113
|
+
| `examples/mplot3d/imshow3d.py` | fig1.png 62270px |
|
|
114
|
+
| `examples/scales/asinh_demo.py` | fig3.png 82852px |
|
|
115
|
+
| `examples/scales/custom_scale.py` | fig1.png 48894px |
|
|
116
|
+
| `examples/showcase/xkcd.py` | fig1.png 1100px; fig2.png 5420px |
|
|
117
|
+
| `examples/specialty_plots/skewt.py` | fig1.png 37300px |
|
|
118
|
+
| `examples/statistics/histogram_bihistogram.py` | fig1.png 11286px |
|
|
119
|
+
| `examples/style_sheets/petroff10.py` | fig1.png 160677px |
|
|
120
|
+
| `examples/style_sheets/style_sheets_reference.py` | fig2.png 29496px |
|
|
121
|
+
| `examples/subplots_axes_and_figures/align_labels_demo.py` | fig1.png 11907px |
|
|
122
|
+
| `examples/subplots_axes_and_figures/secondary_axis.py` | fig1.png 1006px; fig3.png 1852px |
|
|
123
|
+
| `examples/widgets/menu.py` | fig1.png 11036px |
|
|
124
|
+
| `plot_types/3D/scatter3d_simple.py` | fig1.png 11586px |
|
|
125
|
+
| `tutorials/artists.py` | fig2.png 5736px |
|
|
126
|
+
| `tutorials/pyplot.py` | fig1.png 1729px |
|
|
127
|
+
| `users_explain/artists/transforms_tutorial.py` | fig4.png 109241px; fig5.png 27717px; fig6.png 85797px; fig7.png 66377px |
|
|
128
|
+
| `users_explain/axes/arranging_axes.py` | fig14.png 137px |
|
|
129
|
+
| `users_explain/axes/axes_ticks.py` | fig6.png 55812px |
|
|
130
|
+
| `users_explain/axes/axes_units.py` | fig12.png 35999px |
|
|
131
|
+
| `users_explain/axes/constrainedlayout_guide.py` | fig27.png 56803px; fig28.png 48441px; fig29.png 20653px |
|
|
132
|
+
| `users_explain/axes/legend_guide.py` | fig7.png 1012px; fig9.png 13364px |
|
|
133
|
+
| `users_explain/colors/colors.py` | fig1.png 3510px; fig2.png 1877px; fig3.png 2250px; fig4.png 58442px |
|
|
134
|
+
| `users_explain/customizing.py` | fig1.png 48785px |
|
|
135
|
+
|
|
136
|
+
### 略過案例
|
|
137
|
+
|
|
138
|
+
| Gallery 腳本 | 參考實作的錯誤/略過原因 |
|
|
139
|
+
| --- | --- |
|
|
140
|
+
| `examples/event_handling/ginput_manual_clabel_sgskip.py` | mpl: timeout |
|
|
141
|
+
| `examples/misc/multipage_pdf.py` | mpl: Transcript written on file.log. |
|
|
142
|
+
| `examples/misc/multiprocess_sgskip.py` | mpl: BrokenPipeError: [Errno 32] Broken pipe |
|
|
143
|
+
| `examples/mplot3d/pathpatch3d.py` | mpl: Transcript written on file.log. |
|
|
144
|
+
| `examples/text_labels_and_annotations/demo_text_path.py` | mpl: Transcript written on file.log. |
|
|
145
|
+
| `examples/text_labels_and_annotations/tex_demo.py` | mpl: Transcript written on file.log. |
|
|
146
|
+
| `examples/text_labels_and_annotations/usetex_baseline_test.py` | mpl: Transcript written on file.log. |
|
|
147
|
+
| `examples/text_labels_and_annotations/usetex_fonteffects.py` | mpl: Transcript written on file.log. |
|
|
148
|
+
| `examples/user_interfaces/embedding_in_gtk3_panzoom_sgskip.py` | mpl: ModuleNotFoundError: No module named 'gi' |
|
|
149
|
+
| `examples/user_interfaces/embedding_in_gtk3_sgskip.py` | mpl: ModuleNotFoundError: No module named 'gi' |
|
|
150
|
+
| `examples/user_interfaces/embedding_in_gtk4_panzoom_sgskip.py` | mpl: ModuleNotFoundError: No module named 'gi' |
|
|
151
|
+
| `examples/user_interfaces/embedding_in_gtk4_sgskip.py` | mpl: ModuleNotFoundError: No module named 'gi' |
|
|
152
|
+
| `examples/user_interfaces/embedding_in_qt_sgskip.py` | mpl: ImportError: Failed to import any of the following Qt binding modules: PyQt6, PySide6, PyQt5, PySide2 |
|
|
153
|
+
| `examples/user_interfaces/embedding_in_tk_sgskip.py` | mpl: _tkinter.TclError: no display name and no $DISPLAY environment variable |
|
|
154
|
+
| `examples/user_interfaces/embedding_in_wx2_sgskip.py` | mpl: ModuleNotFoundError: No module named 'wx' |
|
|
155
|
+
| `examples/user_interfaces/embedding_in_wx3_sgskip.py` | mpl: ModuleNotFoundError: No module named 'wx' |
|
|
156
|
+
| `examples/user_interfaces/embedding_in_wx4_sgskip.py` | mpl: ModuleNotFoundError: No module named 'wx' |
|
|
157
|
+
| `examples/user_interfaces/embedding_in_wx5_sgskip.py` | mpl: ModuleNotFoundError: No module named 'wx' |
|
|
158
|
+
| `examples/user_interfaces/embedding_webagg_sgskip.py` | mpl: RuntimeError: This example requires tornado. |
|
|
159
|
+
| `examples/user_interfaces/fourier_demo_wx_sgskip.py` | mpl: ModuleNotFoundError: No module named 'wx' |
|
|
160
|
+
| `examples/user_interfaces/gtk3_spreadsheet_sgskip.py` | mpl: ModuleNotFoundError: No module named 'gi' |
|
|
161
|
+
| `examples/user_interfaces/gtk4_spreadsheet_sgskip.py` | mpl: ModuleNotFoundError: No module named 'gi' |
|
|
162
|
+
| `examples/user_interfaces/mathtext_wx_sgskip.py` | mpl: ModuleNotFoundError: No module named 'wx' |
|
|
163
|
+
| `examples/user_interfaces/mpl_with_glade3_sgskip.py` | mpl: ModuleNotFoundError: No module named 'gi' |
|
|
164
|
+
| `examples/user_interfaces/pylab_with_gtk3_sgskip.py` | mpl: ImportError: The GTK3 backends require PyGObject |
|
|
165
|
+
| `examples/user_interfaces/pylab_with_gtk4_sgskip.py` | mpl: ImportError: The GTK4 backends require PyGObject |
|
|
166
|
+
| `examples/user_interfaces/toolmanager_sgskip.py` | mpl: AttributeError: 'NoneType' object has no attribute 'add_tool' |
|
|
167
|
+
| `examples/user_interfaces/web_application_server_sgskip.py` | mpl: ModuleNotFoundError: No module named 'flask' |
|
|
168
|
+
| `examples/user_interfaces/wxcursor_demo_sgskip.py` | mpl: ModuleNotFoundError: No module named 'wx' |
|
|
169
|
+
|
|
170
|
+
未留下 figure 的腳本:`examples/misc/font_indexing.py`、`examples/misc/ftface_props.py`、`examples/units/basic_units.py`、`examples/user_interfaces/canvasagg.py`、`users_explain/configuration.py`、`users_explain/text/fonts.py`、`users_explain/text/pgf.py`、`users_explain/text/usetex.py`。
|
|
171
|
+
|
|
172
|
+
Gallery 的 `OK` 只表示上述執行方式沒有發現差異;
|
|
173
|
+
沒有留下 figure 的腳本不計入 PNG 相容率。`SKIP` 表示參考實作無法完成,
|
|
174
|
+
不表示 Rust 實作已通過該功能。Agg 執行並未驗證 GUI、滑鼠鍵盤互動、動畫播放或影片編碼。
|
|
175
|
+
部分 upstream `sgskip` 範例本來就需要互動環境;外部 TeX、GUI 函式庫或資料不足也可能造成略過。
|
|
176
|
+
|
|
177
|
+
## 效能測試
|
|
178
|
+
|
|
179
|
+
`tests/bench/phases.py` 建立 8 × 6 吋的 2 × 2 subplot:
|
|
180
|
+
每個 panel 有兩條各 1,000 點的曲線、20 個 scatter 點、標題、圖例、格線,並套用 tight layout。
|
|
181
|
+
第一次 PNG 存檔後,再更新標題並連續存檔 10 次。
|
|
182
|
+
每輪交錯執行 Matplotlib 與 matplotlib-rs,共各 5 個全新 Python 行程,列出各階段的最小值;
|
|
183
|
+
後續存檔欄位則是每個行程內 10 次存檔的平均,再取 5 個行程的最小值。
|
|
184
|
+
各階段最小值可能來自不同一輪,因此不把它們相加當成完整執行時間。
|
|
185
|
+
量測時沒有同時執行測試或編譯。
|
|
186
|
+
|
|
187
|
+
| 階段 | Matplotlib 最小值(ms) | matplotlib-rs 最小值(ms) | 倍率 |
|
|
188
|
+
| --- | --- | --- | --- |
|
|
189
|
+
| import | 588.7 | 329.0 | 1.79× |
|
|
190
|
+
| 建立圖表與 tight layout | 188.8 | 199.9 | 0.94× |
|
|
191
|
+
| 第一次 PNG 存檔 | 294.0 | 103.0 | 2.85× |
|
|
192
|
+
| 後續 PNG 存檔(每次) | 299.6 | 86.3 | 3.47× |
|
|
193
|
+
|
|
194
|
+
五輪數值有明顯波動,另列中位數供判讀;原始逐輪值保留在 `benchmark.log` 與 `benchmark.json`。
|
|
195
|
+
|
|
196
|
+
| 階段 | Matplotlib 五輪中位數(ms) | matplotlib-rs 五輪中位數(ms) |
|
|
197
|
+
| --- | --- | --- |
|
|
198
|
+
| import | 1223.2 | 553.4 |
|
|
199
|
+
| 建立圖表與 tight layout | 312.3 | 270.4 |
|
|
200
|
+
| 第一次 PNG 存檔 | 374.9 | 108.8 |
|
|
201
|
+
| 後續 PNG 存檔(每次) | 390.6 | 156.0 |
|
|
202
|
+
|
|
203
|
+
倍率為 Matplotlib 耗時/matplotlib-rs 耗時;大於 1 表示該階段 Rust 實作較快。
|
|
204
|
+
import 包含 NumPy 與 pyplot,後續存檔包含重新繪圖、PNG 壓縮及檔案寫入。
|
|
205
|
+
這是一個工作負載的量測,不保證所有圖形或完整程式均有相同比例的加速。
|
|
206
|
+
|
|
207
|
+
## 安裝與發行檔驗證
|
|
208
|
+
|
|
209
|
+
- Cargo.toml、Cargo.lock 與 Python distribution 版本皆為 `0.0.1`。
|
|
210
|
+
- 補列實際使用的 Python 依賴,Python 最低版本設定為 3.11。
|
|
211
|
+
- 建置 source distribution 與 CPython 3.12、Linux x86_64、manylinux_2_35 wheel。
|
|
212
|
+
- wheel 通過 maturin 的 manylinux audit check;需要 glibc 2.35 以上。
|
|
213
|
+
- 以沒有原版 Matplotlib 的全新 virtualenv 安裝 wheel,`pip check` 通過。
|
|
214
|
+
- 確認 import hook 指向已安裝套件,再測試 line、scatter、legend、mathtext、imshow、contour、
|
|
215
|
+
constrained layout 與 PNG/SVG/PDF/EPS 輸出;全部通過。
|
|
216
|
+
- 乾淨安裝解析出的 NumPy 是 2.5.4,其餘主要依賴與上表相同;安裝紀錄包含於 validation ZIP。
|
|
217
|
+
- 確認 sdist 含 README、Cargo.lock、測試腳本及授權,wheel 含必要程式、資料與字型授權。
|
|
218
|
+
- 不同 Python 版本、Windows 與 macOS 尚未在本次驗證。
|
|
219
|
+
|
|
220
|
+
為供沿用的 Matplotlib 程式判斷 API 相容版本,`matplotlib_rs.__version__` 保留 `3.11.2`;
|
|
221
|
+
實際發行版本請使用 `importlib.metadata.version("matplotlib-rs")`。
|
|
222
|
+
|
|
223
|
+
## 重跑方式
|
|
224
|
+
|
|
225
|
+
在專案根目錄及已啟用的 Python 虛擬環境執行:
|
|
226
|
+
|
|
227
|
+
```bash
|
|
228
|
+
python -m pip install 'maturin>=1.5,<2' 'matplotlib==3.11.2'
|
|
229
|
+
python -m pip install -e .
|
|
230
|
+
sh scripts/dev_build.sh --locked
|
|
231
|
+
export PYTHONPATH="$PWD/python"
|
|
232
|
+
export MPLBACKEND=Agg
|
|
233
|
+
|
|
234
|
+
# Linux:自動補上 PyO3 test executable 所需的 libpython linker flags。
|
|
235
|
+
sh scripts/test_rust.sh
|
|
236
|
+
|
|
237
|
+
for test in tests/unit/test_*.py tests/lowlevel/diff_*.py tests/model/first_plot.py; do
|
|
238
|
+
python "$test" || exit 1
|
|
239
|
+
done
|
|
240
|
+
|
|
241
|
+
COMPARE_OUT=/tmp/mplrs-0.0.1-compare \
|
|
242
|
+
COMPARE_VECTOR=svg,pdf,eps python tests/compare/compare.py
|
|
243
|
+
|
|
244
|
+
curl -fL https://codeload.github.com/matplotlib/matplotlib/tar.gz/refs/tags/v3.11.2 \
|
|
245
|
+
-o /tmp/matplotlib-v3.11.2.tar.gz
|
|
246
|
+
tar -xzf /tmp/matplotlib-v3.11.2.tar.gz -C /tmp
|
|
247
|
+
GALLERY_OUT=/tmp/mplrs-0.0.1-gallery \
|
|
248
|
+
python tests/gallery/run_gallery.py /tmp/matplotlib-3.11.2/galleries -j 2 --timeout 60
|
|
249
|
+
|
|
250
|
+
sh tests/bench/best_of.sh mpl 5
|
|
251
|
+
sh tests/bench/best_of.sh rs 5
|
|
252
|
+
|
|
253
|
+
# 本次發行量測以此順序交錯執行,並從各欄取五輪最小值。
|
|
254
|
+
for round in 1 2 3 4 5; do
|
|
255
|
+
MATPLOTLIBRC=tests/mplrc python tests/bench/phases.py mpl
|
|
256
|
+
MATPLOTLIBRC=tests/mplrc python tests/bench/phases.py rs
|
|
257
|
+
done
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
如參考實作因耗時而 timeout,可提高 `--timeout` 後重跑該案例;
|
|
261
|
+
互動範例仍需要另行提供其執行條件。Gallery 遇到 DIFF/ERR 會以非零退出碼結束,
|
|
262
|
+
沒有匹配腳本亦會報錯。測試腳本退出碼與結果內容都應納入判讀。
|
|
263
|
+
|
|
264
|
+
## 覆蓋率解讀
|
|
265
|
+
|
|
266
|
+
本報告的百分比限定於列明的案例、輸出檔案及上述執行條件。
|
|
267
|
+
尚未量測 Python/Rust 原始碼行覆蓋率與分支覆蓋率,亦未定義全 Matplotlib API 的覆蓋率分母;
|
|
268
|
+
請勿將案例通過率解讀為完整 API 相容率。
|
docs/releases/0.0.2.md
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# 0.0.2
|
|
2
|
+
|
|
3
|
+
本版改善大量箱形圖的物件建立時間,加入可重現的效能測試與 GitHub Actions CI/CD。
|
|
4
|
+
|
|
5
|
+
## 效能改善
|
|
6
|
+
|
|
7
|
+
相同的單張圖包含 30 組、每組 180 個隨機箱形圖,每箱 100 個樣本、各組不同顏色。
|
|
8
|
+
保留 5,400 個可獨立修改的箱體與 32,400 條線,未合併物件或延後建立至繪製階段。
|
|
9
|
+
|
|
10
|
+
在相同 Python 3.12/NumPy 2.3.5 環境,原始 0.0.1 wheel 與本版各預熱一次、交錯量測五次:
|
|
11
|
+
|
|
12
|
+
| 指標(五輪中位數) | 0.0.1 | 0.0.2 | 改善 |
|
|
13
|
+
| --- | --- | --- | --- |
|
|
14
|
+
| 建圖 | 36.601 秒 | 1.458 秒 | **25.10×** |
|
|
15
|
+
| 建圖+首次繪製 | 37.047 秒 | 1.779 秒 | **20.83×** |
|
|
16
|
+
| 行程最高 RSS | 593.6 MiB | 266.9 MiB | 減少 55.0% |
|
|
17
|
+
|
|
18
|
+
五輪個別建圖倍率為 12.47、24.50、25.10、15.47、26.21;全部超過 10 倍。
|
|
19
|
+
所有暖機與量測的資料及 RGBA hash 相同,存檔 PNG 差異像素為 0。
|
|
20
|
+
這是指定負載與本機環境的量測,並不代表所有圖表都加速 25 倍。
|
|
21
|
+
|
|
22
|
+
改善包括規則浮點矩陣的批次 boxplot 統計、共用樣式驗證、原生物件複製、
|
|
23
|
+
座標範圍批次更新與延遲配置 callback 儲存空間。
|
|
24
|
+
需要自訂 Axes、座標轉換、單位或特殊樣式時保留一般路徑。
|
|
25
|
+
新增物件獨立性、修改、移除、callback、pickle、property cycle 與統計精確比較測試。
|
|
26
|
+
|
|
27
|
+
另修正 EPS 裁切路徑快取未保留臨時 affine transform,可能因物件位址重用而套用錯誤裁切區域的問題。
|
|
28
|
+
新增 1,000 個獨立裁切轉換的回歸測試。參考 Matplotlib 3.11.2 有相同問題;
|
|
29
|
+
CI 明確保留參考轉換的生命週期後,仍以完整內容比對 EPS,未降低比較門檻。
|
|
30
|
+
|
|
31
|
+
[完整重跑方式](https://github.com/g21589/matplotlib-rs/blob/v0.0.2/tests/bench/README.md) · [五輪原始數據](https://github.com/g21589/matplotlib-rs/blob/v0.0.2/docs/benchmarks/boxplots-0.0.2.json)
|
|
32
|
+
|
|
33
|
+
## 本機驗證
|
|
34
|
+
|
|
35
|
+
- Rust:1 個單元測試通過;doctest 0 個。
|
|
36
|
+
- Python:5 支單元測試、4 支底層 renderer/字型差異測試、1 支原生模型案例全通過。
|
|
37
|
+
- Boxplot:186 組統計比較,以及 19 組物件行為與像素案例通過。
|
|
38
|
+
- 自有繪圖:58 個案例,PNG 74/74、SVG 71/71、PDF 71/71 完全一致。
|
|
39
|
+
- EPS:修正快取生命週期並穩定參考端後,71/71 內容一致;`polar_more` 另連續重跑五次完全一致。
|
|
40
|
+
- 官方 boxplot gallery:6/6 像素一致;未重跑全部上游 gallery。
|
|
41
|
+
|
|
42
|
+
完整 0.0.1 gallery 範圍與相容性限制見 [前版驗證報告](https://github.com/g21589/matplotlib-rs/blob/v0.0.2/docs/releases/0.0.1.md)。
|
|
43
|
+
功能案例通過率與原始碼行/分支覆蓋率不同,本版未量測原始碼覆蓋率。
|
|
44
|
+
|
|
45
|
+
## CI/CD 與安裝
|
|
46
|
+
|
|
47
|
+
新增 push/PR 的 Python 3.11~3.13 自動測試,以及版本標籤觸發的發布流程。
|
|
48
|
+
發布前必須通過全部 CI、乾淨環境 wheel 安裝驗證、5,400 個箱形圖像素一致及至少 10× 建圖效能門檻。
|
|
49
|
+
詳見 [CI/CD 說明](https://github.com/g21589/matplotlib-rs/blob/claude/rust-rewrite/docs/CI.md)。
|
|
50
|
+
|
|
51
|
+
Release 附件包括 CPython 3.11/3.12/3.13、Linux x86_64、glibc 2.28 以上的 wheel,
|
|
52
|
+
source distribution、Actions 效能原始紀錄及 `SHA256SUMS`。
|
|
53
|
+
下載符合 Python 版本的 wheel 後:
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
python -m pip install /path/to/matplotlib_rs-0.0.2-*.whl
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
本版現已發布於 [PyPI](https://pypi.org/project/matplotlib-rs/0.0.2/),
|
|
60
|
+
沿用上述 GitHub Release 的三個 wheel 與 source distribution,檔案 SHA256 完全相同。
|
|
61
|
+
可直接安裝:
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
python -m pip install matplotlib-rs==0.0.2
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
PyPI Trusted Publisher [發布流程](https://github.com/g21589/matplotlib-rs/actions/runs/40526936611) 已通過。
|
|
68
|
+
其他平台可從原始碼編譯,但尚未驗證。
|
|
69
|
+
distribution 版本為 `0.0.2`;`matplotlib_rs.__version__` 保留相容性 API 版本 `3.11.2`。
|
docs/releases/0.0.3.md
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# 0.0.3
|
|
2
|
+
|
|
3
|
+
本版支援 **Python 3.10**,執行期**只依賴 NumPy**,並再加快大量箱形圖的建立。
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
python -m pip install matplotlib-rs==0.0.3 # 只會一併安裝 NumPy
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## Python 3.10 與只依賴 NumPy
|
|
10
|
+
|
|
11
|
+
- `requires-python` 改為 `>=3.10`,相依只剩 `numpy>=1.25`;發布流程新增 cp310 wheel。
|
|
12
|
+
唯一用到 3.11 語法的 `BaseException.add_note` 改為相容寫法。
|
|
13
|
+
- cycler 0.12.1、pyparsing 3.3.3、python-dateutil 3.0.0、six 1.17.0 原樣內建於
|
|
14
|
+
`matplotlib_rs._vendor`,`tools/vendor_deps.py` 可從固定版本重現,CI 檢查內容一致。
|
|
15
|
+
已安裝的 cycler 仍優先使用,使 `cycler.Cycler` 物件可通過驗證;
|
|
16
|
+
`matplotlib_rs.install()` 後,未安裝的 `cycler`/`dateutil` 也可被腳本匯入。
|
|
17
|
+
- constrained layout:以 Rust 移植 kiwi 1.5 的 Cassowary 求解器(`src/mpl/kiwi.rs`),
|
|
18
|
+
Python 端依 kiwisolver 的 `symbolics.h` 逐一重現運算(例如除法乘上 `1.0 / d`)。
|
|
19
|
+
kiwisolver 依變數的記憶體位址排列限制式的項,僅改變輸出路徑長度就可能改變 SVG 座標末位;
|
|
20
|
+
內建版本依建立順序排列,結果固定。常見版面的座標與 kiwisolver 逐位元相同。
|
|
21
|
+
`MPLRS_KIWI=kiwisolver` 可改用已安裝的 kiwisolver。
|
|
22
|
+
- 等高線:以 Rust 移植 ContourPy 的 `mpl2014`(Matplotlib 預設演算法),頂點與路徑碼逐位元相同。
|
|
23
|
+
`serial`/`threaded`/`mpl2005` 仍需 ContourPy;`MPLRS_CONTOUR=contourpy` 可改用 ContourPy。
|
|
24
|
+
- Delaunay 三角網格:內建並以 `cc` 編譯 Matplotlib 使用的 qhull 8.0.2(套用 Matplotlib 的 qhull 修補),
|
|
25
|
+
依 Matplotlib `_qhull_wrapper.cpp` 的步驟輸出,三角形、頂點與鄰接順序相同。
|
|
26
|
+
先前沒有 Matplotlib 時改用的 Rust Delaunay 三角形相同但順序不同,`tri_plots` 因此有像素差異;
|
|
27
|
+
現在一律使用 qhull,也不再載入已安裝 Matplotlib 的編譯模組。`MPLRS_QHULL=rust` 仍可選用舊方法。
|
|
28
|
+
從原始碼安裝需要 C 編譯器。
|
|
29
|
+
- PNG:沒有 Pillow 時由 Rust 解碼與編碼。`imread` 依 Matplotlib 以 Pillow 讀取的規則轉換
|
|
30
|
+
(1/2/4/8/16 bit 灰階、調色盤與 tRNS、灰階加透明、16 bit 彩色取高位元組),數值相同。
|
|
31
|
+
PDF/SVG/PGF 內嵌影像改由本專案編碼,像素相同但位元組不同;安裝 Pillow 時仍使用 Pillow。
|
|
32
|
+
- fontTools 只在 Type 42 字型嵌入時匯入;JPEG/TIFF/WebP/GIF/AVIF、`pil_kwargs` 與
|
|
33
|
+
`PillowWriter` 需要 Pillow,缺少時的 `ImportError` 會說明需要的套件。
|
|
34
|
+
選用套件可用 `pip install "matplotlib-rs[full]"` 安裝。
|
|
35
|
+
|
|
36
|
+
## 大量箱形圖
|
|
37
|
+
|
|
38
|
+
每個 `bxp` 呼叫若統計值為一般浮點數,就一次建立全部箱形圖 artists:
|
|
39
|
+
|
|
40
|
+
- 以 NumPy 逐元素計算與原迴圈相同的座標(保留 `get_xdata()` 的 dtype),
|
|
41
|
+
每種元件一次複製全部 Rust handle(`copy_many`/`copy_many_ragged`/`copy_many_paths`),
|
|
42
|
+
再由 Rust 建立各自獨立屬性字典的 Python 物件,子物件與資料範圍各更新一次。
|
|
43
|
+
- callback registry 改在首次使用時建立;箱形圖建立期間暫停循環垃圾回收,
|
|
44
|
+
避免數萬個新物件反覆觸發完整回收。
|
|
45
|
+
- 統計的離群值改為整批計算,`merge_kw_rc` 只讀取 `boxplot.*` 設定。
|
|
46
|
+
|
|
47
|
+
每個 artist 仍是獨立的 `Line2D`/`PathPatch` 與 Rust handle,回傳型別、標籤、
|
|
48
|
+
子物件順序、修改、刪除與 pickle 行為不變;統計值非一般浮點數時沿用逐箱路徑。
|
|
49
|
+
|
|
50
|
+
| 5,400 箱(五輪中位數) | 前 | 0.0.3 | 加速 |
|
|
51
|
+
| --- | --- | --- | --- |
|
|
52
|
+
| 0.0.2 → 0.0.3,Python 3.12,建圖 | 1.119 秒 | 0.470 秒 | **2.38×** |
|
|
53
|
+
| 0.0.2 → 0.0.3,Python 3.12,建圖+首次繪製 | 1.374 秒 | 0.705 秒 | 1.95× |
|
|
54
|
+
| Matplotlib 3.8.2 → 0.0.3(只有 NumPy),Python 3.10,建圖 | 17.664 秒 | 0.492 秒 | **35.9×** |
|
|
55
|
+
| Matplotlib 3.8.2 → 0.0.3(只有 NumPy),Python 3.10,建圖+首次繪製 | 21.986 秒 | 0.712 秒 | **30.9×** |
|
|
56
|
+
| Matplotlib 3.11.2 → 0.0.3,Python 3.12,建圖 | 15.006 秒 | 0.451 秒 | **33.3×** |
|
|
57
|
+
| Matplotlib 3.11.2 → 0.0.3,Python 3.12,建圖+首次繪製 | 18.837 秒 | 0.672 秒 | 28.0× |
|
|
58
|
+
|
|
59
|
+
0.0.2 與 0.0.3 的五輪個別建圖倍率為 2.71、2.14、2.37、2.51、2.62,全部 12 次執行畫布相同。
|
|
60
|
+
Python 3.10 只有 NumPy 的畫布與 Matplotlib 3.11.2 完全相同;與 3.8.2 的差異只在文字,繪圖區內 0 個差異像素。
|
|
61
|
+
最高 RSS:Python 3.10 為 594.9 → 295.5 MiB(對 3.8.2)。
|
|
62
|
+
原始數據見 [`docs/benchmarks/boxplots-0.0.3.json`](../benchmarks/boxplots-0.0.3.json),
|
|
63
|
+
量測方式見 [壓測說明](../../tests/bench/README.md)。
|
|
64
|
+
|
|
65
|
+
## 測試
|
|
66
|
+
|
|
67
|
+
- 新增 `tests/unit/test_native_ports.py`:kiwi、mpl2014、qhull、PNG 讀寫分別逐位元比較
|
|
68
|
+
kiwisolver、ContourPy、Matplotlib `_qhull` 與 Pillow(未安裝時略過比較,只做自我檢查)。
|
|
69
|
+
- 新增 `tests/unit/test_numpy_only.py`:不含 site-packages、只有 NumPy 的子行程不得載入其他套件,
|
|
70
|
+
缺少選用套件時的錯誤訊息正確,且四種格式輸出與完整環境相同。
|
|
71
|
+
- `test_boxplot.py` 新增 8 組選項(浮點位置、凹口水平、平均值、無 caps、無離群值、逐箱寬度等),
|
|
72
|
+
比較每個元件的 dtype、資料與子物件順序,並測試 `bxp` 的整數/float32 統計值與物件獨立性。
|
|
73
|
+
- `tests/compare` 新增 `COMPARE_MPL_PYTHON`/`COMPARE_RS_PYTHON` 跨直譯器比較,
|
|
74
|
+
以及 `COMPARE_DECODE_IMAGES=1` 的內嵌影像解碼比較(其他內容仍須逐位元組相同)。
|
|
75
|
+
- CI 新增 Python 3.10 只有 NumPy 的工作,並以 NumPy 1.25.2 重跑 `test_numpy_only.py`。
|
|
76
|
+
|
|
77
|
+
本機結果:CPython 3.11/3.12/3.13 的 Rust 5 個測試、全部單元與底層差異測試通過,
|
|
78
|
+
58/58 案例 PNG/SVG/PDF/EPS 完全一致;CPython 3.10 只有 NumPy 對 Matplotlib 3.11.2 為 58/58,
|
|
79
|
+
其中 9 個案例的 SVG/PDF 內嵌影像編碼不同、解碼後像素相同。
|
|
80
|
+
cp310 wheel 與 sdist 在乾淨 Python 3.10 venv 安裝後只有 matplotlib-rs 與 NumPy。
|
docs/releases/0.0.4.md
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# 0.0.4
|
|
2
|
+
|
|
3
|
+
本版以大量資料測試 24 種常見基本圖表,找出並修正效能問題;所有案例的畫布與
|
|
4
|
+
**Matplotlib 3.11.2 逐像素相同**。
|
|
5
|
+
|
|
6
|
+
```bash
|
|
7
|
+
python -m pip install matplotlib-rs==0.0.4 # 只會一併安裝 NumPy
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
## 結果
|
|
11
|
+
|
|
12
|
+
[`tests/bench/basic_charts.py`](../../tests/bench/basic_charts.py) 每個案例在全新行程中建立並首次繪製
|
|
13
|
+
8 × 6 吋、100 DPI 的圖,三個實作交錯各跑 3 輪,下表為中位數(秒):
|
|
14
|
+
|
|
15
|
+
| 圖表與資料量 | Matplotlib | 0.0.3 | 0.0.4 | 對 Matplotlib | 對 0.0.3 |
|
|
16
|
+
| --- | ---: | ---: | ---: | ---: | ---: |
|
|
17
|
+
| bar,20,000 根 | 11.228 | 14.550 | 0.165 | 68× | 88× |
|
|
18
|
+
| barh,20,000 根(黑色邊框) | 11.805 | 14.248 | 0.143 | 83× | 100× |
|
|
19
|
+
| hist,2,000,000 筆、10,000 bins | 5.279 | 6.667 | 0.076 | 69× | 87× |
|
|
20
|
+
| hist,10,000,000 筆、200 bins | 0.271 | 0.307 | 0.060 | 4.6× | 5.2× |
|
|
21
|
+
| imshow,4000 × 4000 | 1.929 | 1.792 | 0.252 | 7.7× | 7.1× |
|
|
22
|
+
| hist2d,2,000,000 點、500 × 500 | 0.654 | 0.509 | 0.138 | 4.7× | 3.7× |
|
|
23
|
+
| contourf,1000 × 1000、20 levels | 1.060 | 1.255 | 0.546 | 1.9× | 2.3× |
|
|
24
|
+
| pcolormesh,1000 × 1000 | 0.524 | 0.684 | 0.414 | 1.3× | 1.7× |
|
|
25
|
+
| hist step,3 組 × 2,000,000 筆、2,000 bins | 0.274 | 0.250 | 0.084 | 3.3× | 3.0× |
|
|
26
|
+
| scatter,200,000 點(大小、顏色各異,alpha) | 2.854 | 2.408 | 1.628 | 1.8× | 1.5× |
|
|
27
|
+
| errorbar,20,000 點 | 0.318 | 0.957 | 0.268 | 1.2× | 3.6× |
|
|
28
|
+
| stem,20,000 點 | 0.369 | 0.932 | 0.344 | 1.1× | 2.7× |
|
|
29
|
+
| boxplot,1,000 箱 × 200 筆 | 4.458 | 0.149 | 0.135 | 33× | 1.1× |
|
|
30
|
+
| pie,500 片 | 0.338 | 0.415 | 0.431 | 0.8× | 1.0× |
|
|
31
|
+
|
|
32
|
+
物件數量造成的問題改善最多(長條、直方圖 bins:只看建圖比 0.0.3 快 109~162 倍);
|
|
33
|
+
影像、hist2d、等高線與 pcolormesh 由多執行緒與避免中間陣列加速(`imshow` 繪製比官方快 11.5 倍)。
|
|
34
|
+
官方 Matplotlib 原本就以 C++ 處理的工作(折線簡化、逐點點陣化)兩者成本相近。0.5 秒以下的案例各輪波動大,只能看出量級。
|
|
35
|
+
全部 24 個案例、量測方式與每項修正見 [基本圖表效能報告](../benchmarks/basic-charts.md),
|
|
36
|
+
原始數據見 [`basic-charts.json`](../benchmarks/basic-charts.json)。
|
|
37
|
+
|
|
38
|
+
## 修正內容
|
|
39
|
+
|
|
40
|
+
- **長條圖、直方圖**:`bar`/`barh`/`hist` 以每種樣式一個 prototype 批次複製 `Rectangle`
|
|
41
|
+
與 Rust handle,資料範圍一次更新;仍回傳可各自修改的 `Rectangle`,有單位、逐根標籤或自訂 transform 時沿用原迴圈。
|
|
42
|
+
`hist` 與 `hist2d` 對 65,536 筆以上、無權重的 float64 資料由 Rust 多執行緒執行 NumPy 的計數演算法,
|
|
43
|
+
bin 邊界仍由 NumPy 計算,結果與 `numpy.histogram`/`numpy.histogram2d` 相同。
|
|
44
|
+
- **點陣化**:rasterizer 對只有水平與垂直邊的路徑逐列直接產生 cell;Agg 的 RGBA 混色以乘法取代三次整數除法
|
|
45
|
+
(2³² 種輸入窮舉驗證),長段不透明底色另以查表混色。
|
|
46
|
+
- **path collection 平行化**:256 條以上、無裁切路徑與 hatch 的 `draw_path_collection` 與 `draw_quad_mesh`
|
|
47
|
+
由多個執行緒點陣化、主執行緒依原順序渲染,混色順序不變;QuadMesh 不再為每格建立路徑陣列。
|
|
48
|
+
`MPLRS_THREADS` 可指定執行緒數(`1` 為單執行緒)。
|
|
49
|
+
- **errorbar/stem**:修正 rust-numpy 對大量路徑 view 逐一 borrow 造成的平方複雜度。
|
|
50
|
+
- **折線建圖**:`_path` 模組直接讀取 NumPy 陣列,不再轉成 Python list。
|
|
51
|
+
- **等高線**:mpl2014 各層由多執行緒計算,並在 Rust 合併每層的路徑。
|
|
52
|
+
- **色彩對應與影像**:`Colormap._get_rgba_and_mask` 對 16,384 個以上的 float64/float32 值由 Rust 逐值執行
|
|
53
|
+
NumPy 的步驟。`imshow` 縮小 3 倍以上('rgba' 內插階段)時只計算每個像素的 lut 列號
|
|
54
|
+
(一般的線性 `Normalize` 在同一次掃描中計算),重採樣器直接讀取已預先乘上 alpha 的 lut,
|
|
55
|
+
不再建立 float64 RGBA 陣列(4000 × 4000 時為 512 MB);影像重採樣的輸出列也分給多個執行緒。
|
|
56
|
+
|
|
57
|
+
## 測試
|
|
58
|
+
|
|
59
|
+
- 新增 `tests/unit/test_bar_batch.py`、`test_histogram.py`(一維 124 組、二維 78 組資料與 bins)、
|
|
60
|
+
`test_colormap.py`(每個 colormap 邊界與特殊浮點值、遮罩、bytes、影像的各種 norm 與 alpha)。
|
|
61
|
+
- `test_resample.py` 新增大輸出(多執行緒)與 lut 索引重採樣,共 1,080 組與官方 `_image.resample` 逐位元相同。
|
|
62
|
+
- `tests/lowlevel/diff_path_collection.py` 以大量隨機 collection 與 quad mesh 比較官方 C++ Agg,逐位元組相同。
|
|
63
|
+
- `tests/compare` 新增 `imshow_large`(NaN/±inf、遮罩、float32、整數、LogNorm、TwoSlopeNorm、clip、
|
|
64
|
+
vmin=vmax、純量與陣列 alpha、半透明 lut、under/over/bad、各種內插與內插階段)。
|
|
65
|
+
|
|
66
|
+
本機結果(CPython 3.12、NumPy 2.3.5):Rust 測試、全部單元與底層差異測試通過,
|
|
67
|
+
`tests/compare` 59/59 案例 PNG/SVG/PDF/EPS 與 Matplotlib 3.11.2 完全一致;基本圖表壓測 24 個案例 × 3 輪逐像素一致。
|
|
68
|
+
|
|
69
|
+
## 限制
|
|
70
|
+
|
|
71
|
+
- pie 的每個 wedge 與標籤仍逐一建立 Python 物件並同步到 Rust,500 片時比官方慢(0.8 倍);
|
|
72
|
+
violinplot 的成本在 Python/NumPy 的核密度估計,與官方相近。
|
|
73
|
+
- 平行化的效果取決於可用 CPU 核心數;量測主機為 4 vCPU。
|
docs/releases/0.0.5.md
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# 0.0.5
|
|
2
|
+
|
|
3
|
+
本版將影像檔讀寫移至 Rust 核心,並加入平行 PNG 編碼。執行時依賴仍只有 NumPy;即使已安裝 Pillow,也不會匯入它。
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
python -m pip install matplotlib-rs==0.0.5
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## 更新內容
|
|
10
|
+
|
|
11
|
+
- `savefig`、`imsave`、`imread`、`AxesImage.write_png` 及 SVG/PDF/PGF 內嵌影像改由 Rust 處理。
|
|
12
|
+
- PNG 使用平行過濾與 zlib 壓縮,支援 `pnginfo`、ICC profile 與 EXIF;輸出不隨執行緒數改變。`MPLRS_THREADS` 可指定執行緒數。
|
|
13
|
+
- Rust 核心支援 JPEG、TIFF、WebP、GIF 讀寫及 AVIF 寫入;`PillowWriter` 支援 GIF、APNG 與動態 WebP。
|
|
14
|
+
- 移除 `full` extra 的 Pillow 依賴;fontTools 與 ContourPy 仍為選用依賴。
|
|
15
|
+
- 不支援的 `pil_kwargs` 會回報 `ValueError` 並列出支援的參數。
|
|
16
|
+
|
|
17
|
+
## 相容性與限制
|
|
18
|
+
|
|
19
|
+
- AVIF 不支援讀取;調色盤 TIFF 不支援讀取。
|
|
20
|
+
- JPEG 與 AVIF 使用不同於 Pillow 的編解碼器,輸出不保證逐像素或逐位元組相同。
|
|
21
|
+
- SVG/PDF 內嵌影像的壓縮位元組可能不同;既有 CI 會解碼影像比較像素,並比較其餘內容。
|
|
22
|
+
- 支援格式、參數與效能數據見 [README 的影像檔說明](../../README.zh-TW.md#影像檔)。
|
|
23
|
+
|
|
24
|
+
發布流程會驗證版本一致性、Python 3.10–3.13 wheel 安裝、NumPy-only 環境、完整 CI 與既有箱形圖效能門檻;全部通過後才建立 GitHub Release 並發布 PyPI。
|
docs/releases/0.0.6.md
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# 0.0.6
|
|
2
|
+
|
|
3
|
+
本版延後建立箱形圖的 Python artists,並以 Rust 多執行緒繪製大量物件,降低建圖時間與記憶體用量。執行期仍只依賴 NumPy。
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
python -m pip install matplotlib-rs==0.0.6
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## 更新內容
|
|
10
|
+
|
|
11
|
+
- `boxplot`/`bxp` 以批次儲存座標與樣式,第一次讀取時才建立對應的 `Line2D`/`PathPatch`;建立後仍可獨立修改或移除。
|
|
12
|
+
- Agg renderer 將大量連續的線段、patch 與箱形圖批次一起交給 Rust,平行點陣化與混色,維持原本的繪製順序。
|
|
13
|
+
- 重複的掃描列與相同樣式的 marker 共用運算結果。
|
|
14
|
+
- 規則浮點數箱形圖統計值保留為陣列;公開的 `cbook.boxplot_stats` 仍回傳一般的 dict list。
|
|
15
|
+
- 新增延遲建立、artist 讀取與修改、圖例、版面配置、輸出格式及多執行緒一致性的測試。
|
|
16
|
+
|
|
17
|
+
## 相容性與效能
|
|
18
|
+
|
|
19
|
+
- `MPLRS_LAZY=0` 可停用延遲建立;`MPLRS_THREADS` 可指定執行緒數。
|
|
20
|
+
- 不適用批次的自訂 transform、裁切或樣式沿用原本繪製路徑;SVG/PDF/PS 沿用各自 renderer。
|
|
21
|
+
- 已提交的本機量測中,5,400 箱的建圖與首次繪製合計比 0.0.5 快約 3.1 倍;50,000 箱快約 6.3 倍。數據依硬體與工作負載而異。
|
|
22
|
+
- 量測環境、逐輪資料、像素比對與限制見 [效能報告](../benchmarks/boxplots-lazy.md)。
|
|
23
|
+
|
|
24
|
+
發布流程會檢查版本一致性、完整 CI、Python 3.10–3.13 wheel 的 NumPy-only 安裝與既有箱形圖效能門檻;全部通過後才公開 GitHub Release,並將相同套件發布到 PyPI。
|
docs/releases/0.0.7.md
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# 0.0.7
|
|
2
|
+
|
|
3
|
+
本版整合 PR #5 的 Rust 執行緒池、共享頂點與 Python 圖例及文字版面配置優化,降低重複運算與記憶體用量。執行期仍只依賴 NumPy。
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
python -m pip install matplotlib-rs==0.0.7
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## 更新內容
|
|
10
|
+
|
|
11
|
+
- Rust 平行運算重用常駐執行緒池,處理巢狀呼叫、並行呼叫、fork 與 panic;所有平行迴圈統一遵循 `MPLRS_THREADS` 設定。
|
|
12
|
+
- Agg path collection 依畫布分帶平行混色,維持繪製順序;線段與路徑共用頂點,減少複製。
|
|
13
|
+
- 圖例位置與邊界、文字版面配置及裁切座標轉換減少重複運算;圖例邊界快取由各執行緒獨立保存。
|
|
14
|
+
- Gaussian KDE 重用中間計算,加速 violinplot 建圖。
|
|
15
|
+
- 保留系統記憶體配置器;新增快速路徑、執行緒池、圖例及相容性測試與量測紀錄。
|
|
16
|
+
|
|
17
|
+
## 相容性與效能
|
|
18
|
+
|
|
19
|
+
- 支援 Python 3.10 以上,預編譯 wheel 涵蓋 Linux x86_64、CPython 3.10–3.13。
|
|
20
|
+
- 已提交的本機量測中,四個預設位置圖例的 PNG 存檔時間較 0.0.6 約快 2.1 倍;百萬點折線繪製約快 1.6 倍,最高 RSS 由 202 降至 155 MiB。結果依硬體與工作負載而異。
|
|
21
|
+
- 量測方法、逐輪資料、像素比對與限制見 [效能報告](../benchmarks/threads-legends-lines.md)。
|
|
22
|
+
- 套件發行版本為 `0.0.7`;`matplotlib_rs.__version__` 保留 Matplotlib 相容性 API 版本 `3.11.2`。
|
|
23
|
+
|
|
24
|
+
發布流程會檢查版本一致性、完整 CI、Python 3.10–3.13 wheel 的 NumPy-only 安裝與既有箱形圖效能門檻;全部通過後才公開 GitHub Release,並將相同套件發布到 PyPI。
|
docs/releases/0.0.8.md
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# 0.0.8
|
|
2
|
+
|
|
3
|
+
本版新增 Windows x86_64 預編譯 wheel,並將 Linux 和 Windows wheel 的支援範圍擴充至 CPython 3.10~3.15。執行期只依賴 NumPy。
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
python -m pip install matplotlib-rs==0.0.8
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## 更新內容
|
|
10
|
+
|
|
11
|
+
- Linux x86_64(glibc 2.28 以上)與 Windows x86_64 提供 CPython 3.10~3.15 的 wheel。Windows 可透過 MSVC 建置,並在 CI 中執行 Rust 和 Python 測試。
|
|
12
|
+
- `FT2Font` 依照 FreeType 的規則載入內嵌點陣字形,並改進 `postscript_name` 對字型名稱記錄的解析。Agg 繪製文字時使用字形外框,讓含有點陣字形的字型也能正確顯示。
|
|
13
|
+
- `TrapezoidMapTriFinder` 在 Windows 和新版 Linux Python 上沿用對應 Matplotlib wheel 所用的 C++ 隨機打散行為,使樹狀結構統計一致。
|
|
14
|
+
- 更新英文 README,並保留繁體中文版的安裝與使用說明。
|
|
15
|
+
|
|
16
|
+
套件發行版本為 `0.0.8`。`matplotlib_rs.__version__` 維持 Matplotlib 相容性 API 版本 `3.11.2`。
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
BSD 3-Clause License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2021-2026, ContourPy Developers.
|
|
4
|
+
All rights reserved.
|
|
5
|
+
|
|
6
|
+
Redistribution and use in source and binary forms, with or without
|
|
7
|
+
modification, are permitted provided that the following conditions are met:
|
|
8
|
+
|
|
9
|
+
1. Redistributions of source code must retain the above copyright notice, this
|
|
10
|
+
list of conditions and the following disclaimer.
|
|
11
|
+
|
|
12
|
+
2. Redistributions in binary form must reproduce the above copyright notice,
|
|
13
|
+
this list of conditions and the following disclaimer in the documentation
|
|
14
|
+
and/or other materials provided with the distribution.
|
|
15
|
+
|
|
16
|
+
3. Neither the name of the copyright holder nor the names of its
|
|
17
|
+
contributors may be used to endorse or promote products derived from
|
|
18
|
+
this software without specific prior written permission.
|
|
19
|
+
|
|
20
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
21
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
22
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
23
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
24
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
25
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
26
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
27
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
28
|
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
29
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
licenses/LICENSE_CYCLER
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
Copyright (c) 2015, matplotlib project
|
|
2
|
+
All rights reserved.
|
|
3
|
+
|
|
4
|
+
Redistribution and use in source and binary forms, with or without
|
|
5
|
+
modification, are permitted provided that the following conditions are met:
|
|
6
|
+
|
|
7
|
+
* Redistributions of source code must retain the above copyright notice, this
|
|
8
|
+
list of conditions and the following disclaimer.
|
|
9
|
+
|
|
10
|
+
* Redistributions in binary form must reproduce the above copyright notice,
|
|
11
|
+
this list of conditions and the following disclaimer in the documentation
|
|
12
|
+
and/or other materials provided with the distribution.
|
|
13
|
+
|
|
14
|
+
* Neither the name of the matplotlib project nor the names of its
|
|
15
|
+
contributors may be used to endorse or promote products derived from
|
|
16
|
+
this software without specific prior written permission.
|
|
17
|
+
|
|
18
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
19
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
20
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
21
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
22
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
23
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
24
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
25
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
26
|
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
27
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|