matplotlib-rs 0.0.8__cp315-cp315-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.
Files changed (352) hide show
  1. docs/releases/0.0.1.md +268 -0
  2. docs/releases/0.0.2.md +69 -0
  3. docs/releases/0.0.3.md +80 -0
  4. docs/releases/0.0.4.md +73 -0
  5. docs/releases/0.0.5.md +24 -0
  6. docs/releases/0.0.6.md +24 -0
  7. docs/releases/0.0.7.md +24 -0
  8. docs/releases/0.0.8.md +16 -0
  9. licenses/LICENSE_CONTOURPY +29 -0
  10. licenses/LICENSE_CYCLER +27 -0
  11. licenses/LICENSE_DATEUTIL +54 -0
  12. licenses/LICENSE_KIWISOLVER +71 -0
  13. licenses/LICENSE_LIBWEBP +56 -0
  14. licenses/LICENSE_MATPLOTLIB +1253 -0
  15. licenses/LICENSE_PYPARSING +20 -0
  16. licenses/LICENSE_QHULL +39 -0
  17. licenses/LICENSE_SIX +18 -0
  18. matplotlib_rs/__init__.py +1683 -0
  19. matplotlib_rs/__main__.py +27 -0
  20. matplotlib_rs/_afm.py +500 -0
  21. matplotlib_rs/_animation_data.py +263 -0
  22. matplotlib_rs/_api/__init__.py +495 -0
  23. matplotlib_rs/_api/deprecation.py +534 -0
  24. matplotlib_rs/_axis_py.py +2991 -0
  25. matplotlib_rs/_blocking_input.py +31 -0
  26. matplotlib_rs/_cm.py +1500 -0
  27. matplotlib_rs/_cm_bivar.py +1289 -0
  28. matplotlib_rs/_cm_listed.py +2848 -0
  29. matplotlib_rs/_cm_multivar.py +167 -0
  30. matplotlib_rs/_color_data.py +1142 -0
  31. matplotlib_rs/_colormap.py +132 -0
  32. matplotlib_rs/_constrained_layout.py +825 -0
  33. matplotlib_rs/_contour.py +108 -0
  34. matplotlib_rs/_doc_cache.py +12214 -0
  35. matplotlib_rs/_docstring.py +142 -0
  36. matplotlib_rs/_enums.py +178 -0
  37. matplotlib_rs/_figure_rs.py +294 -0
  38. matplotlib_rs/_fontconfig_pattern.py +129 -0
  39. matplotlib_rs/_foreign.py +220 -0
  40. matplotlib_rs/_hook.py +94 -0
  41. matplotlib_rs/_image.py +160 -0
  42. matplotlib_rs/_imageio.py +229 -0
  43. matplotlib_rs/_internal_utils.py +65 -0
  44. matplotlib_rs/_kiwi.py +484 -0
  45. matplotlib_rs/_layoutgrid.py +549 -0
  46. matplotlib_rs/_live.py +192 -0
  47. matplotlib_rs/_mathtext.py +3103 -0
  48. matplotlib_rs/_mathtext_data.py +1811 -0
  49. matplotlib_rs/_mplrs.cp315-win_amd64.pyd +0 -0
  50. matplotlib_rs/_path.py +25 -0
  51. matplotlib_rs/_png.py +162 -0
  52. matplotlib_rs/_pylab_helpers.py +137 -0
  53. matplotlib_rs/_qhull.py +66 -0
  54. matplotlib_rs/_rcpush.py +84 -0
  55. matplotlib_rs/_spines_rs.py +108 -0
  56. matplotlib_rs/_style_helpers.py +52 -0
  57. matplotlib_rs/_text_helpers.py +51 -0
  58. matplotlib_rs/_tight_bbox.py +85 -0
  59. matplotlib_rs/_tight_layout.py +302 -0
  60. matplotlib_rs/_tri.py +140 -0
  61. matplotlib_rs/_type1font.py +1228 -0
  62. matplotlib_rs/_vendor/__init__.py +8 -0
  63. matplotlib_rs/_vendor/cycler.py +574 -0
  64. matplotlib_rs/_vendor/dateutil/__init__.py +27 -0
  65. matplotlib_rs/_vendor/dateutil/_common.py +44 -0
  66. matplotlib_rs/_vendor/dateutil/_tzdata_impl.py +148 -0
  67. matplotlib_rs/_vendor/dateutil/_version.py +5 -0
  68. matplotlib_rs/_vendor/dateutil/easter.py +90 -0
  69. matplotlib_rs/_vendor/dateutil/parser/__init__.py +62 -0
  70. matplotlib_rs/_vendor/dateutil/parser/_parser.py +1614 -0
  71. matplotlib_rs/_vendor/dateutil/parser/isoparser.py +417 -0
  72. matplotlib_rs/_vendor/dateutil/relativedelta.py +597 -0
  73. matplotlib_rs/_vendor/dateutil/rrule.py +1765 -0
  74. matplotlib_rs/_vendor/dateutil/tz/__init__.py +61 -0
  75. matplotlib_rs/_vendor/dateutil/tz/_common.py +420 -0
  76. matplotlib_rs/_vendor/dateutil/tz/_factories.py +81 -0
  77. matplotlib_rs/_vendor/dateutil/tz/_tzfile.py +1429 -0
  78. matplotlib_rs/_vendor/dateutil/tz/_tzpath.py +105 -0
  79. matplotlib_rs/_vendor/dateutil/tz/tz.py +1473 -0
  80. matplotlib_rs/_vendor/dateutil/tz/win.py +371 -0
  81. matplotlib_rs/_vendor/dateutil/tzwin.py +3 -0
  82. matplotlib_rs/_vendor/dateutil/utils.py +72 -0
  83. matplotlib_rs/_vendor/dateutil/zoneinfo/__init__.py +234 -0
  84. matplotlib_rs/_vendor/pyparsing/__init__.py +414 -0
  85. matplotlib_rs/_vendor/pyparsing/actions.py +265 -0
  86. matplotlib_rs/_vendor/pyparsing/common.py +571 -0
  87. matplotlib_rs/_vendor/pyparsing/core.py +6973 -0
  88. matplotlib_rs/_vendor/pyparsing/exceptions.py +354 -0
  89. matplotlib_rs/_vendor/pyparsing/helpers.py +1770 -0
  90. matplotlib_rs/_vendor/pyparsing/results.py +929 -0
  91. matplotlib_rs/_vendor/pyparsing/testing.py +399 -0
  92. matplotlib_rs/_vendor/pyparsing/unicode.py +357 -0
  93. matplotlib_rs/_vendor/pyparsing/util.py +515 -0
  94. matplotlib_rs/_vendor/pyparsing/warnings.py +11 -0
  95. matplotlib_rs/_vendor/six.py +1004 -0
  96. matplotlib_rs/animation.py +1843 -0
  97. matplotlib_rs/artist.py +2302 -0
  98. matplotlib_rs/axes/__init__.py +19 -0
  99. matplotlib_rs/axes/_axes.py +9402 -0
  100. matplotlib_rs/axes/_bar.py +185 -0
  101. matplotlib_rs/axes/_base.py +5236 -0
  102. matplotlib_rs/axes/_base_rs.py +727 -0
  103. matplotlib_rs/axes/_boxplot.py +391 -0
  104. matplotlib_rs/axes/_hist.py +99 -0
  105. matplotlib_rs/axes/_secondary_axes.py +357 -0
  106. matplotlib_rs/axis.py +1963 -0
  107. matplotlib_rs/backend_bases.py +3760 -0
  108. matplotlib_rs/backend_managers.py +388 -0
  109. matplotlib_rs/backend_tools.py +1002 -0
  110. matplotlib_rs/backends/__init__.py +6 -0
  111. matplotlib_rs/backends/_backend_pdf_ps.py +451 -0
  112. matplotlib_rs/backends/backend_agg.py +552 -0
  113. matplotlib_rs/backends/backend_mixed.py +123 -0
  114. matplotlib_rs/backends/backend_pdf.py +2711 -0
  115. matplotlib_rs/backends/backend_pgf.py +1031 -0
  116. matplotlib_rs/backends/backend_ps.py +1491 -0
  117. matplotlib_rs/backends/backend_svg.py +1395 -0
  118. matplotlib_rs/backends/backend_template.py +214 -0
  119. matplotlib_rs/backends/registry.py +423 -0
  120. matplotlib_rs/bezier.py +691 -0
  121. matplotlib_rs/category.py +236 -0
  122. matplotlib_rs/cbook.py +2762 -0
  123. matplotlib_rs/cm.py +251 -0
  124. matplotlib_rs/collections.py +2711 -0
  125. matplotlib_rs/colorbar.py +1586 -0
  126. matplotlib_rs/colorizer.py +909 -0
  127. matplotlib_rs/colors.py +4278 -0
  128. matplotlib_rs/container.py +256 -0
  129. matplotlib_rs/contour.py +1756 -0
  130. matplotlib_rs/dates.py +1847 -0
  131. matplotlib_rs/dviread.py +1386 -0
  132. matplotlib_rs/figure.py +3815 -0
  133. matplotlib_rs/font_manager.py +1855 -0
  134. matplotlib_rs/ft2font.py +515 -0
  135. matplotlib_rs/gridspec.py +808 -0
  136. matplotlib_rs/hatch.py +244 -0
  137. matplotlib_rs/image.py +1863 -0
  138. matplotlib_rs/inset.py +291 -0
  139. matplotlib_rs/layout_engine.py +310 -0
  140. matplotlib_rs/legend.py +1480 -0
  141. matplotlib_rs/legend_handler.py +812 -0
  142. matplotlib_rs/lines.py +1886 -0
  143. matplotlib_rs/markers.py +908 -0
  144. matplotlib_rs/mathtext.py +141 -0
  145. matplotlib_rs/mlab.py +959 -0
  146. matplotlib_rs/mpl-data/fonts/ttf/DejaVuSans-Bold.ttf +0 -0
  147. matplotlib_rs/mpl-data/fonts/ttf/DejaVuSans-BoldOblique.ttf +0 -0
  148. matplotlib_rs/mpl-data/fonts/ttf/DejaVuSans-Oblique.ttf +0 -0
  149. matplotlib_rs/mpl-data/fonts/ttf/DejaVuSans.ttf +0 -0
  150. matplotlib_rs/mpl-data/fonts/ttf/DejaVuSansDisplay.ttf +0 -0
  151. matplotlib_rs/mpl-data/fonts/ttf/DejaVuSansMono-Bold.ttf +0 -0
  152. matplotlib_rs/mpl-data/fonts/ttf/DejaVuSansMono-BoldOblique.ttf +0 -0
  153. matplotlib_rs/mpl-data/fonts/ttf/DejaVuSansMono-Oblique.ttf +0 -0
  154. matplotlib_rs/mpl-data/fonts/ttf/DejaVuSansMono.ttf +0 -0
  155. matplotlib_rs/mpl-data/fonts/ttf/DejaVuSerif-Bold.ttf +0 -0
  156. matplotlib_rs/mpl-data/fonts/ttf/DejaVuSerif-BoldItalic.ttf +0 -0
  157. matplotlib_rs/mpl-data/fonts/ttf/DejaVuSerif-Italic.ttf +0 -0
  158. matplotlib_rs/mpl-data/fonts/ttf/DejaVuSerif.ttf +0 -0
  159. matplotlib_rs/mpl-data/fonts/ttf/DejaVuSerifDisplay.ttf +0 -0
  160. matplotlib_rs/mpl-data/fonts/ttf/LICENSE_DEJAVU +99 -0
  161. matplotlib_rs/mpl-data/fonts/ttf/LICENSE_STIX +124 -0
  162. matplotlib_rs/mpl-data/fonts/ttf/LastResortHE-Regular.ttf +0 -0
  163. matplotlib_rs/mpl-data/fonts/ttf/STIXGeneral.ttf +0 -0
  164. matplotlib_rs/mpl-data/fonts/ttf/STIXGeneralBol.ttf +0 -0
  165. matplotlib_rs/mpl-data/fonts/ttf/STIXGeneralBolIta.ttf +0 -0
  166. matplotlib_rs/mpl-data/fonts/ttf/STIXGeneralItalic.ttf +0 -0
  167. matplotlib_rs/mpl-data/fonts/ttf/STIXNonUni.ttf +0 -0
  168. matplotlib_rs/mpl-data/fonts/ttf/STIXNonUniBol.ttf +0 -0
  169. matplotlib_rs/mpl-data/fonts/ttf/STIXNonUniBolIta.ttf +0 -0
  170. matplotlib_rs/mpl-data/fonts/ttf/STIXNonUniIta.ttf +0 -0
  171. matplotlib_rs/mpl-data/fonts/ttf/STIXSizFiveSymReg.ttf +0 -0
  172. matplotlib_rs/mpl-data/fonts/ttf/STIXSizFourSymBol.ttf +0 -0
  173. matplotlib_rs/mpl-data/fonts/ttf/STIXSizFourSymReg.ttf +0 -0
  174. matplotlib_rs/mpl-data/fonts/ttf/STIXSizOneSymBol.ttf +0 -0
  175. matplotlib_rs/mpl-data/fonts/ttf/STIXSizOneSymReg.ttf +0 -0
  176. matplotlib_rs/mpl-data/fonts/ttf/STIXSizThreeSymBol.ttf +0 -0
  177. matplotlib_rs/mpl-data/fonts/ttf/STIXSizThreeSymReg.ttf +0 -0
  178. matplotlib_rs/mpl-data/fonts/ttf/STIXSizTwoSymBol.ttf +0 -0
  179. matplotlib_rs/mpl-data/fonts/ttf/STIXSizTwoSymReg.ttf +0 -0
  180. matplotlib_rs/mpl-data/fonts/ttf/cmb10.ttf +0 -0
  181. matplotlib_rs/mpl-data/fonts/ttf/cmex10.ttf +0 -0
  182. matplotlib_rs/mpl-data/fonts/ttf/cmmi10.ttf +0 -0
  183. matplotlib_rs/mpl-data/fonts/ttf/cmr10.ttf +0 -0
  184. matplotlib_rs/mpl-data/fonts/ttf/cmss10.ttf +0 -0
  185. matplotlib_rs/mpl-data/fonts/ttf/cmsy10.ttf +0 -0
  186. matplotlib_rs/mpl-data/fonts/ttf/cmti10.ttf +0 -0
  187. matplotlib_rs/mpl-data/fonts/ttf/cmtt10.ttf +0 -0
  188. matplotlib_rs/mpl-data/images/back-symbolic.svg +46 -0
  189. matplotlib_rs/mpl-data/images/back.pdf +0 -0
  190. matplotlib_rs/mpl-data/images/back.png +0 -0
  191. matplotlib_rs/mpl-data/images/back.svg +46 -0
  192. matplotlib_rs/mpl-data/images/back_large.png +0 -0
  193. matplotlib_rs/mpl-data/images/filesave-symbolic.svg +68 -0
  194. matplotlib_rs/mpl-data/images/filesave.pdf +72 -0
  195. matplotlib_rs/mpl-data/images/filesave.png +0 -0
  196. matplotlib_rs/mpl-data/images/filesave.svg +68 -0
  197. matplotlib_rs/mpl-data/images/filesave_large.png +0 -0
  198. matplotlib_rs/mpl-data/images/forward-symbolic.svg +46 -0
  199. matplotlib_rs/mpl-data/images/forward.pdf +0 -0
  200. matplotlib_rs/mpl-data/images/forward.png +0 -0
  201. matplotlib_rs/mpl-data/images/forward.svg +46 -0
  202. matplotlib_rs/mpl-data/images/forward_large.png +0 -0
  203. matplotlib_rs/mpl-data/images/hand.pdf +0 -0
  204. matplotlib_rs/mpl-data/images/hand.png +0 -0
  205. matplotlib_rs/mpl-data/images/hand.svg +130 -0
  206. matplotlib_rs/mpl-data/images/help-symbolic.svg +52 -0
  207. matplotlib_rs/mpl-data/images/help.pdf +71 -0
  208. matplotlib_rs/mpl-data/images/help.png +0 -0
  209. matplotlib_rs/mpl-data/images/help.svg +52 -0
  210. matplotlib_rs/mpl-data/images/help_large.png +0 -0
  211. matplotlib_rs/mpl-data/images/home-symbolic.svg +59 -0
  212. matplotlib_rs/mpl-data/images/home.pdf +0 -0
  213. matplotlib_rs/mpl-data/images/home.png +0 -0
  214. matplotlib_rs/mpl-data/images/home.svg +59 -0
  215. matplotlib_rs/mpl-data/images/home_large.png +0 -0
  216. matplotlib_rs/mpl-data/images/matplotlib.pdf +0 -0
  217. matplotlib_rs/mpl-data/images/matplotlib.png +0 -0
  218. matplotlib_rs/mpl-data/images/matplotlib.svg +3171 -0
  219. matplotlib_rs/mpl-data/images/matplotlib_large.png +0 -0
  220. matplotlib_rs/mpl-data/images/move-symbolic.svg +73 -0
  221. matplotlib_rs/mpl-data/images/move.pdf +0 -0
  222. matplotlib_rs/mpl-data/images/move.png +0 -0
  223. matplotlib_rs/mpl-data/images/move.svg +73 -0
  224. matplotlib_rs/mpl-data/images/move_large.png +0 -0
  225. matplotlib_rs/mpl-data/images/qt4_editor_options.pdf +0 -0
  226. matplotlib_rs/mpl-data/images/qt4_editor_options.png +0 -0
  227. matplotlib_rs/mpl-data/images/qt4_editor_options.svg +48 -0
  228. matplotlib_rs/mpl-data/images/qt4_editor_options_large.png +0 -0
  229. matplotlib_rs/mpl-data/images/subplots-symbolic.svg +81 -0
  230. matplotlib_rs/mpl-data/images/subplots.pdf +0 -0
  231. matplotlib_rs/mpl-data/images/subplots.png +0 -0
  232. matplotlib_rs/mpl-data/images/subplots.svg +81 -0
  233. matplotlib_rs/mpl-data/images/subplots_large.png +0 -0
  234. matplotlib_rs/mpl-data/images/zoom_to_rect-symbolic.svg +40 -0
  235. matplotlib_rs/mpl-data/images/zoom_to_rect.pdf +69 -0
  236. matplotlib_rs/mpl-data/images/zoom_to_rect.png +0 -0
  237. matplotlib_rs/mpl-data/images/zoom_to_rect.svg +40 -0
  238. matplotlib_rs/mpl-data/images/zoom_to_rect_large.png +0 -0
  239. matplotlib_rs/mpl-data/kpsewhich.lua +4 -0
  240. matplotlib_rs/mpl-data/matplotlibrc +849 -0
  241. matplotlib_rs/mpl-data/plot_directive/plot_directive.css +16 -0
  242. matplotlib_rs/mpl-data/sample_data/Minduka_Present_Blue_Pack.png +0 -0
  243. matplotlib_rs/mpl-data/sample_data/README.txt +2 -0
  244. matplotlib_rs/mpl-data/sample_data/Stocks.csv +526 -0
  245. matplotlib_rs/mpl-data/sample_data/axes_grid/bivariate_normal.npy +0 -0
  246. matplotlib_rs/mpl-data/sample_data/data_x_x2_x3.csv +11 -0
  247. matplotlib_rs/mpl-data/sample_data/eeg.dat +0 -0
  248. matplotlib_rs/mpl-data/sample_data/embedding_in_wx3.xrc +65 -0
  249. matplotlib_rs/mpl-data/sample_data/goog.npz +0 -0
  250. matplotlib_rs/mpl-data/sample_data/grace_hopper.jpg +0 -0
  251. matplotlib_rs/mpl-data/sample_data/jacksboro_fault_dem.npz +0 -0
  252. matplotlib_rs/mpl-data/sample_data/logo2.png +0 -0
  253. matplotlib_rs/mpl-data/sample_data/membrane.dat +0 -0
  254. matplotlib_rs/mpl-data/sample_data/msft.csv +66 -0
  255. matplotlib_rs/mpl-data/sample_data/s1045.ima.gz +0 -0
  256. matplotlib_rs/mpl-data/sample_data/topobathy.npz +0 -0
  257. matplotlib_rs/mpl-data/stylelib/Solarize_Light2.mplstyle +53 -0
  258. matplotlib_rs/mpl-data/stylelib/_classic_test_patch.mplstyle +8 -0
  259. matplotlib_rs/mpl-data/stylelib/_mpl-gallery-nogrid.mplstyle +19 -0
  260. matplotlib_rs/mpl-data/stylelib/_mpl-gallery.mplstyle +19 -0
  261. matplotlib_rs/mpl-data/stylelib/bmh.mplstyle +27 -0
  262. matplotlib_rs/mpl-data/stylelib/classic.mplstyle +491 -0
  263. matplotlib_rs/mpl-data/stylelib/dark_background.mplstyle +26 -0
  264. matplotlib_rs/mpl-data/stylelib/fast.mplstyle +11 -0
  265. matplotlib_rs/mpl-data/stylelib/fivethirtyeight.mplstyle +37 -0
  266. matplotlib_rs/mpl-data/stylelib/ggplot.mplstyle +39 -0
  267. matplotlib_rs/mpl-data/stylelib/grayscale.mplstyle +29 -0
  268. matplotlib_rs/mpl-data/stylelib/petroff10.mplstyle +5 -0
  269. matplotlib_rs/mpl-data/stylelib/petroff6.mplstyle +5 -0
  270. matplotlib_rs/mpl-data/stylelib/petroff8.mplstyle +5 -0
  271. matplotlib_rs/mpl-data/stylelib/seaborn-v0_8-bright.mplstyle +3 -0
  272. matplotlib_rs/mpl-data/stylelib/seaborn-v0_8-colorblind.mplstyle +3 -0
  273. matplotlib_rs/mpl-data/stylelib/seaborn-v0_8-dark-palette.mplstyle +3 -0
  274. matplotlib_rs/mpl-data/stylelib/seaborn-v0_8-dark.mplstyle +30 -0
  275. matplotlib_rs/mpl-data/stylelib/seaborn-v0_8-darkgrid.mplstyle +30 -0
  276. matplotlib_rs/mpl-data/stylelib/seaborn-v0_8-deep.mplstyle +3 -0
  277. matplotlib_rs/mpl-data/stylelib/seaborn-v0_8-muted.mplstyle +3 -0
  278. matplotlib_rs/mpl-data/stylelib/seaborn-v0_8-notebook.mplstyle +21 -0
  279. matplotlib_rs/mpl-data/stylelib/seaborn-v0_8-paper.mplstyle +21 -0
  280. matplotlib_rs/mpl-data/stylelib/seaborn-v0_8-pastel.mplstyle +3 -0
  281. matplotlib_rs/mpl-data/stylelib/seaborn-v0_8-poster.mplstyle +21 -0
  282. matplotlib_rs/mpl-data/stylelib/seaborn-v0_8-talk.mplstyle +21 -0
  283. matplotlib_rs/mpl-data/stylelib/seaborn-v0_8-ticks.mplstyle +30 -0
  284. matplotlib_rs/mpl-data/stylelib/seaborn-v0_8-white.mplstyle +30 -0
  285. matplotlib_rs/mpl-data/stylelib/seaborn-v0_8-whitegrid.mplstyle +30 -0
  286. matplotlib_rs/mpl-data/stylelib/seaborn-v0_8.mplstyle +57 -0
  287. matplotlib_rs/mpl-data/stylelib/tableau-colorblind10.mplstyle +3 -0
  288. matplotlib_rs/mpl_toolkits/__init__.py +3 -0
  289. matplotlib_rs/mpl_toolkits/axes_grid1/__init__.py +11 -0
  290. matplotlib_rs/mpl_toolkits/axes_grid1/anchored_artists.py +415 -0
  291. matplotlib_rs/mpl_toolkits/axes_grid1/axes_divider.py +619 -0
  292. matplotlib_rs/mpl_toolkits/axes_grid1/axes_grid.py +565 -0
  293. matplotlib_rs/mpl_toolkits/axes_grid1/axes_rgb.py +158 -0
  294. matplotlib_rs/mpl_toolkits/axes_grid1/axes_size.py +272 -0
  295. matplotlib_rs/mpl_toolkits/axes_grid1/inset_locator.py +525 -0
  296. matplotlib_rs/mpl_toolkits/axes_grid1/mpl_axes.py +129 -0
  297. matplotlib_rs/mpl_toolkits/axes_grid1/parasite_axes.py +261 -0
  298. matplotlib_rs/mpl_toolkits/axisartist/__init__.py +15 -0
  299. matplotlib_rs/mpl_toolkits/axisartist/angle_helper.py +396 -0
  300. matplotlib_rs/mpl_toolkits/axisartist/axes_divider.py +3 -0
  301. matplotlib_rs/mpl_toolkits/axisartist/axis_artist.py +1148 -0
  302. matplotlib_rs/mpl_toolkits/axisartist/axisline_style.py +193 -0
  303. matplotlib_rs/mpl_toolkits/axisartist/axislines.py +475 -0
  304. matplotlib_rs/mpl_toolkits/axisartist/floating_axes.py +265 -0
  305. matplotlib_rs/mpl_toolkits/axisartist/grid_finder.py +329 -0
  306. matplotlib_rs/mpl_toolkits/axisartist/grid_helper_curvelinear.py +353 -0
  307. matplotlib_rs/mpl_toolkits/axisartist/parasite_axes.py +8 -0
  308. matplotlib_rs/mpl_toolkits/mplot3d/__init__.py +4 -0
  309. matplotlib_rs/mpl_toolkits/mplot3d/art3d.py +1758 -0
  310. matplotlib_rs/mpl_toolkits/mplot3d/axes3d.py +4462 -0
  311. matplotlib_rs/mpl_toolkits/mplot3d/axis3d.py +807 -0
  312. matplotlib_rs/mpl_toolkits/mplot3d/proj3d.py +270 -0
  313. matplotlib_rs/offsetbox.py +1726 -0
  314. matplotlib_rs/patches.py +5049 -0
  315. matplotlib_rs/path.py +1147 -0
  316. matplotlib_rs/patheffects.py +512 -0
  317. matplotlib_rs/projections/__init__.py +126 -0
  318. matplotlib_rs/projections/geo.py +512 -0
  319. matplotlib_rs/projections/polar.py +1518 -0
  320. matplotlib_rs/pylab.py +68 -0
  321. matplotlib_rs/pyplot.py +4834 -0
  322. matplotlib_rs/quiver.py +1236 -0
  323. matplotlib_rs/rcsetup.py +3435 -0
  324. matplotlib_rs/sankey.py +815 -0
  325. matplotlib_rs/scale.py +1002 -0
  326. matplotlib_rs/spines.py +618 -0
  327. matplotlib_rs/stackplot.py +144 -0
  328. matplotlib_rs/streamplot.py +768 -0
  329. matplotlib_rs/style/__init__.py +269 -0
  330. matplotlib_rs/style/core.py +28 -0
  331. matplotlib_rs/table.py +860 -0
  332. matplotlib_rs/texmanager.py +375 -0
  333. matplotlib_rs/text.py +2412 -0
  334. matplotlib_rs/textpath.py +377 -0
  335. matplotlib_rs/ticker.py +3111 -0
  336. matplotlib_rs/transforms.py +3069 -0
  337. matplotlib_rs/tri/__init__.py +24 -0
  338. matplotlib_rs/tri/_triangulation.py +248 -0
  339. matplotlib_rs/tri/_tricontour.py +271 -0
  340. matplotlib_rs/tri/_trifinder.py +97 -0
  341. matplotlib_rs/tri/_triinterpolate.py +1575 -0
  342. matplotlib_rs/tri/_tripcolor.py +170 -0
  343. matplotlib_rs/tri/_triplot.py +87 -0
  344. matplotlib_rs/tri/_trirefine.py +308 -0
  345. matplotlib_rs/tri/_tritools.py +264 -0
  346. matplotlib_rs/typing.py +597 -0
  347. matplotlib_rs/units.py +196 -0
  348. matplotlib_rs/widgets.py +4455 -0
  349. matplotlib_rs-0.0.8.dist-info/METADATA +392 -0
  350. matplotlib_rs-0.0.8.dist-info/RECORD +352 -0
  351. matplotlib_rs-0.0.8.dist-info/WHEEL +4 -0
  352. matplotlib_rs-0.0.8.dist-info/sboms/matplotlib-rs.cyclonedx.json +4390 -0
@@ -0,0 +1,392 @@
1
+ Metadata-Version: 2.4
2
+ Name: matplotlib-rs
3
+ Version: 0.0.8
4
+ Classifier: Operating System :: Microsoft :: Windows
5
+ Classifier: Operating System :: POSIX :: Linux
6
+ Classifier: Programming Language :: Python :: 3
7
+ Classifier: Programming Language :: Python :: 3.10
8
+ Classifier: Programming Language :: Python :: 3.11
9
+ Classifier: Programming Language :: Python :: 3.12
10
+ Classifier: Programming Language :: Python :: 3.13
11
+ Classifier: Programming Language :: Python :: 3.14
12
+ Classifier: Programming Language :: Python :: 3.15
13
+ Classifier: Programming Language :: Python :: Implementation :: CPython
14
+ Classifier: Programming Language :: Rust
15
+ Classifier: Topic :: Scientific/Engineering :: Visualization
16
+ Requires-Dist: numpy>=1.25
17
+ Requires-Dist: fonttools>=4.28.2 ; extra == 'full'
18
+ Requires-Dist: contourpy>=1.0.1 ; extra == 'full'
19
+ Provides-Extra: full
20
+ Summary: A Rust rendering core with a Matplotlib-compatible Python API
21
+ License: PSF-2.0
22
+ Requires-Python: >=3.10
23
+ Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
24
+
25
+ # matplotlib-rs
26
+
27
+ **Matplotlib with a Rust rendering core.** Your existing Matplotlib code runs unchanged and produces the same pixels, usually much faster. NumPy is the only dependency.
28
+
29
+ [![PyPI](https://img.shields.io/pypi/v/matplotlib-rs?label=PyPI)][pypi]
30
+ [![Python](https://img.shields.io/badge/python-3.10%2B-blue)][pypi]
31
+ [![CI](https://github.com/g21589/matplotlib-rs/actions/workflows/ci.yml/badge.svg)][ci]
32
+ [![License: PSF-2.0](https://img.shields.io/badge/license-PSF--2.0-green)][license]
33
+
34
+ English · [繁體中文][readme-zh]
35
+
36
+ matplotlib-rs rewrites Matplotlib's rendering pipeline in Rust and keeps the Matplotlib 3.11 Python API on top of it. The Rust code covers Agg rasterization, font loading and text layout, the figure/axes/artist model, image resampling and image file codecs. Scripts written for Matplotlib run as-is, and across the project's test suite their output matches Matplotlib 3.11.2 pixel for pixel.
37
+
38
+ ```python
39
+ import matplotlib_rs
40
+ matplotlib_rs.install() # from now on, `import matplotlib` loads matplotlib-rs
41
+
42
+ import matplotlib.pyplot as plt # your existing code, unchanged
43
+ ```
44
+
45
+ [Installation](#installation) · [Quick start](#quick-start) · [Performance](#performance) · [Compatibility](#compatibility) · [Configuration](#configuration) · [Verification](#verification) · [Development](#development)
46
+
47
+ ## Highlights
48
+
49
+ - **Drop-in replacement.** It implements the Matplotlib 3.11 API, both `pyplot` and the object-oriented interface. A single call makes `import matplotlib` and `import mpl_toolkits` load matplotlib-rs. You can also run an unmodified script with `python -m matplotlib_rs script.py`.
50
+ - **Identical output.** In every test case, PNG output is pixel-identical to Matplotlib 3.11.2, and SVG, PDF and EPS output matches the reference content.
51
+ - **Fast.** A bar chart with 20,000 bars is built and drawn 77× faster than with Matplotlib. A typical 2 × 2 figure with legends saves 6–7× faster, and 50,000 boxplots draw over 300× faster. Rasterization, colormapping, resampling, histograms, contours and PNG compression all run on multiple threads.
52
+ - **Only NumPy.** You don't need Pillow, kiwisolver or ContourPy. Image files are read and written in Rust. The Rust ports of kiwi and of ContourPy's default algorithm, and the bundled qhull, reproduce the original results bit for bit.
53
+ - **Checked before every release.** A release goes out only after the full CI suite passes, every wheel works in a clean environment that has only NumPy, and a performance check passes.
54
+
55
+ ## Installation
56
+
57
+ ```bash
58
+ pip install matplotlib-rs
59
+ ```
60
+
61
+ | Platform | Support |
62
+ | --- | --- |
63
+ | Linux x86_64 (glibc ≥ 2.28), CPython 3.10–3.15 | Prebuilt wheels, tested in CI and in every release |
64
+ | Windows x86_64, CPython 3.10–3.15 | Prebuilt wheels, tested in CI (3.11, 3.14 and 3.15) and in every release |
65
+ | Other platforms and Python versions | Builds from the source distribution, but hasn't been tested yet |
66
+
67
+ The only runtime dependency is **NumPy ≥ 1.25**. In a fresh environment, installing adds only `matplotlib-rs` and `numpy`.
68
+
69
+ Two features need optional packages, which you can add with `pip install "matplotlib-rs[full]"`:
70
+
71
+ | Feature | Package |
72
+ | --- | --- |
73
+ | Type 42 font embedding (`pdf.fonttype` or `ps.fonttype` set to `42`) | fontTools |
74
+ | The `serial`, `threaded` and `mpl2005` contour algorithms (`mpl2014`, the default, is built in) | ContourPy |
75
+
76
+ If one of these packages is missing, the feature raises an `ImportError` that explains what to install. Features that rely on external programs, such as usetex, GUI backends and movie writers, still need those programs.
77
+
78
+ **Building from source** needs a stable Rust toolchain and a C compiler (gcc or clang on Linux, MSVC on Windows). pip uses maturin to compile the Rust extension and the bundled qhull:
79
+
80
+ ```bash
81
+ git clone --branch v0.0.8 https://github.com/g21589/matplotlib-rs.git
82
+ cd matplotlib-rs
83
+ python -m pip install .
84
+ ```
85
+
86
+ PyPI and [GitHub Releases][releases] carry the same tested files. Each GitHub release also includes the source distribution, the raw benchmark records and a `SHA256SUMS` file.
87
+
88
+ ## Quick start
89
+
90
+ ```python
91
+ import matplotlib_rs
92
+
93
+ # Call this before anything imports matplotlib or mpl_toolkits.
94
+ matplotlib_rs.install()
95
+
96
+ import matplotlib
97
+ matplotlib.use("Agg")
98
+ import matplotlib.pyplot as plt
99
+
100
+ fig, ax = plt.subplots()
101
+ ax.plot([1, 2, 3], [1, 4, 9], marker="o", label="y = x²")
102
+ ax.set(xlabel="x", ylabel="y", title="matplotlib-rs")
103
+ ax.legend()
104
+ fig.savefig("example.png", dpi=150)
105
+ plt.close(fig)
106
+ ```
107
+
108
+ There are three ways to use matplotlib-rs:
109
+
110
+ | Approach | When to use it |
111
+ | --- | --- |
112
+ | `matplotlib_rs.install()` and then `import matplotlib` | Existing code and third-party libraries that import `matplotlib` |
113
+ | `python -m matplotlib_rs script.py [args]` or `python -m matplotlib_rs -m package.module` | Running unmodified scripts or modules |
114
+ | `import matplotlib_rs.pyplot as plt` | New code that names matplotlib-rs directly |
115
+
116
+ - Use only one implementation in each Python process. `install()` raises `RuntimeError` if `matplotlib` has already been imported.
117
+ - After `install()`, `from cycler import cycler` and `import dateutil` load the bundled copies if those packages aren't installed.
118
+ - `importlib.metadata.version("matplotlib-rs")` returns the package version. `matplotlib_rs.__version__` returns `3.11.2`, the Matplotlib API version that matplotlib-rs implements, so version checks in existing code keep working.
119
+
120
+ ## Performance
121
+
122
+ These timings compare matplotlib-rs 0.0.7 with Matplotlib 3.11.2. Every run checks that the two canvases are pixel-identical. Chart timings include creating the figure and drawing it for the first time.
123
+
124
+ | Workload | Matplotlib 3.11.2 | matplotlib-rs 0.0.7 | Speedup |
125
+ | --- | ---: | ---: | ---: |
126
+ | 2 × 2 figure, four legends at `loc="best"`, `tight_layout`, save as PNG | 176.2 ms | **26.1 ms** | 6.8× |
127
+ | Bar chart, 20,000 bars | 9.355 s | **0.121 s** | 77× |
128
+ | Histogram, 2,000,000 values in 10,000 bins | 4.454 s | **0.082 s** | 54× |
129
+ | Boxplot, 1,000 boxes × 200 values | 3.519 s | **0.077 s** | 46× |
130
+ | `imshow`, 4000 × 4000 image | 1.550 s | **0.232 s** | 6.7× |
131
+ | Histogram, 10,000,000 values | 0.265 s | **0.053 s** | 5.0× |
132
+ | `hist2d`, 2,000,000 points | 0.519 s | **0.124 s** | 4.2× |
133
+ | Scatter, 200,000 points with per-point size and color | 2.286 s | **0.736 s** | 3.1× |
134
+ | `contourf`, 1000 × 1000 grid | 1.113 s | **0.422 s** | 2.6× |
135
+ | Line, 1,000,000 points | 0.127 s | 0.118 s | 1.1× |
136
+ | Pie, 500 wedges | 0.281 s | 0.285 s | 1.0× |
137
+
138
+ Each value is the median of five fresh processes on a 4-vCPU Intel Xeon VM at 2.10 GHz, running Linux x86_64, CPython 3.13 and NumPy 2.5.3. Your results will depend on your hardware and workload.
139
+
140
+ The biggest gains come where Matplotlib creates one Python object per element, such as bars, histogram bins and boxes, and from multi-threaded image, colormap, contour and path-collection work. Where Matplotlib already does the work in C++, for example simplifying long lines, the two are about even.
141
+
142
+ **Large boxplots.** A single `boxplot` call with 50,000 boxes takes 158.5 s to build and draw in Matplotlib and 0.53 s in matplotlib-rs, 301× faster. Peak memory falls from 4,123 MiB to 211 MiB. matplotlib-rs creates the `Line2D` and `PathPatch` artists only when your code reads them, and they behave like ordinary artists. These figures come from 0.0.6, as the median of five runs; Matplotlib was run once.
143
+
144
+ **PNG encoding.** matplotlib-rs encodes every PNG in Rust on multiple threads, using the same zlib level 6 that Matplotlib gets from Pillow. The resulting file doesn't depend on the number of threads. For nine typical figures, from 640 × 480 to 2400 × 1800:
145
+
146
+ | Encoder | Total time | Total size |
147
+ | --- | ---: | ---: |
148
+ | Matplotlib (Pillow, zlib level 6) | 724.7 ms | 3,150 kB |
149
+ | matplotlib-rs, default (zlib level 6) | **75.2 ms (9.6×)** | **3,061 kB** |
150
+ | matplotlib-rs, `pil_kwargs={"compress_level": 1}` | 23.1 ms (31×) | 4,931 kB |
151
+
152
+ The reports below give the methodology, per-round data, raw JSON and limitations. They are currently written in Traditional Chinese.
153
+
154
+ - [24 chart types with large data][bench-basic]
155
+ - [Worker threads, shared vertices and legend layout (0.0.7)][bench-threads]
156
+ - [Lazy boxplots and parallel drawing (0.0.6)][bench-lazy]
157
+ - [PNG encoding][bench-png]
158
+
159
+ To reproduce the benchmarks, install the reference Matplotlib from `requirements-ci.txt` and build the extension (see [Development](#development)), then run:
160
+
161
+ ```bash
162
+ python tests/bench/basic_charts.py --rounds 3
163
+ python tests/bench/legends.py --rounds 5
164
+ python tests/bench/boxplot_lazy.py --boxes 5400 50000 --rounds 5 --mpl
165
+ python tests/bench/png_save.py
166
+ ```
167
+
168
+ ## Compatibility
169
+
170
+ ### What's covered
171
+
172
+ The project's test suite checks the following features against Matplotlib:
173
+
174
+ | Area | Features |
175
+ | --- | --- |
176
+ | Basic charts | line, scatter, bar/barh, hist/hist2d, hexbin, pie, boxplot, violin, stem, step, stackplot |
177
+ | Fields and images | imshow, pcolormesh, contour, triangulations, quiver, streamplot, image resampling |
178
+ | Coordinates and layout | log, logit, dates, polar, 3D, subplots, subfigures, mosaic, tight and constrained layout, insets, secondary axes, twin axes |
179
+ | Text and styling | annotations, arrows, fonts, mathtext, text bounding boxes, legends, tables, styles, hatching, spines, ticks |
180
+ | Rendering and output | clip paths, blitting, animated artists, rasterization, PNG, SVG, PDF and EPS, transparent backgrounds, tight bounding boxes |
181
+
182
+ This table shows what the tests cover. It doesn't mean that every Matplotlib API, parameter or backend is supported.
183
+
184
+ ### Replaced dependencies
185
+
186
+ matplotlib-rs provides everything Matplotlib normally installs alongside it:
187
+
188
+ | Matplotlib dependency | How matplotlib-rs replaces it |
189
+ | --- | --- |
190
+ | cycler, pyparsing, python-dateutil (with six) | Bundled unmodified in `matplotlib_rs._vendor`. An installed cycler takes precedence. |
191
+ | kiwisolver (constrained layout) | Rust port of the kiwi 1.5 solver, with the same order of operations. Layouts are deterministic. |
192
+ | ContourPy (contours) | Rust port of the default `mpl2014` algorithm, with bit-identical vertices |
193
+ | qhull (Delaunay triangulation) | Compiles in qhull 8.0.2, the version Matplotlib uses, so triangles come out in the same order |
194
+ | Pillow (image files, images embedded in PDF and SVG, `PillowWriter`) | Image reading and writing is done in Rust (see [Image file formats](#image-file-formats)) |
195
+ | fontTools, packaging | fontTools is needed only for Type 42 fonts. Version parsing is built in. |
196
+
197
+ matplotlib-rs never imports Pillow, even if it's installed. You can still pass PIL images to functions such as `imshow`.
198
+
199
+ ### Image file formats
200
+
201
+ `savefig`, `imsave`, `imread`, `PillowWriter` and the images embedded in SVG, PDF and PGF files all go through the Rust core. The defaults match what Matplotlib produces through Pillow.
202
+
203
+ | Format | Writing | Reading (`imread`) |
204
+ | --- | --- | --- |
205
+ | PNG | Parallel compression at zlib level 6. Options: `compress_level`, `optimize`, `compress_type`, `pnginfo`, `icc_profile`, `exif` | Bit-identical to Matplotlib (float32 values from 0 to 1) |
206
+ | JPEG | Quality 75, 4:2:0 subsampling and JFIF dpi; large images are encoded in parallel segments. Options: `quality`, `subsampling`, `optimize`, `progressive`, `icc_profile`, `exif` | Values within ±8 of libjpeg-turbo, and usually identical. CMYK is converted as Pillow does. |
207
+ | TIFF | Uncompressed, like Pillow. `compression` can be LZW, Deflate or PackBits | Grayscale (8- and 16-bit), RGB(A), grayscale with alpha, 1-bit and CMYK images, read as Pillow reads them |
208
+ | WebP | Bundled libwebp 1.6.0, lossy quality 80, method 4. **Files are byte-identical to Pillow's.** | libwebp, same as Pillow |
209
+ | GIF | A separate palette for each frame. Exact for up to 256 colors, otherwise median cut | First frame as RGBA, same as Pillow |
210
+ | AVIF | rav1e, quality 75, speed 6 | Not supported |
211
+
212
+ `PillowWriter` (`writer="pillow"`) writes GIF, APNG (`.png`) and animated WebP. If you pass a `pil_kwargs` option that isn't supported, you get a `ValueError` that lists the options that are.
213
+
214
+ Encode and decode times compared with Pillow 13.0.0, in milliseconds (median of 7 runs on 4 vCPUs):
215
+
216
+ | Image | Format | Pillow write | matplotlib-rs write | Pillow read | matplotlib-rs read |
217
+ | --- | --- | ---: | ---: | ---: | ---: |
218
+ | 800 × 600 | JPEG | 2.8 | 3.1 | 2.0 | 1.4 |
219
+ | 800 × 600 | TIFF | 1.4 | 0.5 | 0.8 | 0.2 |
220
+ | 800 × 600 | WebP | 29.3 | 30.3 | 5.3 | 3.9 |
221
+ | 800 × 600 | GIF | 7.3 | 9.4 | 1.9 | 2.9 |
222
+ | 2400 × 1800 | JPEG | 28.7 | 16.5 | 18.4 | 11.9 |
223
+ | 2400 × 1800 | TIFF | 9.8 | 8.0 | 14.7 | 5.3 |
224
+ | 2400 × 1800 | WebP | 213.2 | 235.3 | 46.7 | 24.3 |
225
+ | 2400 × 1800 | GIF | 66.6 | 85.5 | 11.4 | 17.8 |
226
+
227
+ ### Known limitations
228
+
229
+ - **Validated scope.** Testing covers non-interactive rendering with Agg and the vector backends on Linux x86_64 and Windows x86_64. GUI backends, interactive use, external TeX and movie tools, and other platforms (such as macOS) haven't been tested yet.
230
+ - **Official gallery.** In the last full run (0.0.1), the PNG output of 508 of 544 image-producing gallery scripts (93.4%) was identical to Matplotlib's. The other 36 had pixel differences, and no script failed with an error. The details are in the [0.0.1 validation report][release-001].
231
+ - **Fonts with embedded bitmaps.** Many Windows fonts (such as Calibri and Courier New) and CJK fonts contain bitmaps for some pixel sizes. At those sizes FreeType loads bitmap glyphs, and Matplotlib 3.11.2 loses that text in Agg output, because it moves each glyph with a transform that FreeType applies to outlines only. matplotlib-rs draws the outlines there. The `FT2Font` API (`set_size`, `load_glyph`, `set_text`, `_layout`) uses the bitmaps as FreeType does.
232
+ - **Embedded images.** Images embedded in SVG and PDF files are compressed by matplotlib-rs rather than Pillow. Their bytes differ from Matplotlib's files, but they decode to the same pixels.
233
+ - **Image codecs.** AVIF and palette TIFF files can't be read. JPEG and AVIF use different codecs from Pillow, so their output isn't guaranteed to be identical. For images with more than 256 colors, GIF palettes differ from Pillow's, and file sizes differ by 1–25%.
234
+ - **Pie charts and violin plots** run at about Matplotlib's speed. Pie charts still create one Python object per wedge, and violin plots spend most of their time in the NumPy density estimate.
235
+ - **Idle worker threads.** After the first parallel draw, a process keeps `MPLRS_THREADS - 1` idle worker threads. Forked child processes start their own.
236
+
237
+ ## Configuration
238
+
239
+ | Environment variable | Default | Effect |
240
+ | --- | --- | --- |
241
+ | `MPLRS_THREADS` | Number of available cores, up to 8 | Sets the number of threads for parallel work: path collections, large batches of lines and patches, image resampling, colormapping, histograms, contours and PNG compression. `1` turns threading off. Output is the same for any thread count. |
242
+ | `MPLRS_LAZY` | `1` | `0` creates all boxplot artists immediately in `boxplot` and `bxp`. |
243
+ | `MPLRS_KIWI` | unset | `kiwisolver` uses the installed kiwisolver instead of the built-in solver. |
244
+ | `MPLRS_CONTOUR` | unset | `contourpy` uses the installed ContourPy for the `mpl2014` algorithm. |
245
+ | `MPLRS_QHULL` | unset | `rust` uses the Rust Delaunay triangulation. It produces the same triangles, possibly in a different order. |
246
+
247
+ Matplotlib's own settings, such as `MPLBACKEND`, `MPLCONFIGDIR`, `matplotlibrc` and style sheets, work as usual.
248
+
249
+ ## How it works
250
+
251
+ ```
252
+ your code
253
+ │ import matplotlib ──► matplotlib_rs (Python layer: the Matplotlib 3.11 API)
254
+ ▼
255
+ _mplrs (Rust core, connected to Python with PyO3 and rust-numpy)
256
+ ├── mpl/ figure, axes and artist model, legends, mathtext, kiwi solver, mpl2014 contours
257
+ ├── agg/ port of Anti-Grain Geometry 2.4 (rasterizer, scanlines, strokes)
258
+ ├── font/ TrueType/OpenType/CFF loading and glyph rasterization, text layout
259
+ ├── backend/ Agg renderer, path converters, image resampling, image codecs, PNG encoder
260
+ └── pool.rs worker threads that start once and are reused for parallel loops
261
+ extern/qhull qhull 8.0.2, compiled into the extension
262
+ ```
263
+
264
+ The Python package is adapted from Matplotlib 3.11, so public classes, signatures, rcParams and behavior follow Matplotlib. Drawing, layout and file output run in the Rust core.
265
+
266
+ ## Verification
267
+
268
+ Every comparison uses **Matplotlib 3.11.2** as the reference, with the Agg backend and a fixed [`matplotlibrc`][mplrc]. A PNG passes only if every RGBA pixel is identical. SVG, PDF and EPS files are compared by content, with timestamps and the SVG hash salt fixed. The only line ignored is the output filename line in PostScript files. Raster images embedded in SVG and PDF files are compared after decoding.
269
+
270
+ | Check | Result |
271
+ | --- | --- |
272
+ | Plotting cases ([`tests/compare`][compare]), on every CI run | 59/59 identical in PNG, SVG, PDF and EPS |
273
+ | Large-data chart benchmark | 24/24 chart types pixel-identical |
274
+ | Python 3.10 with only NumPy installed, compared with Matplotlib on Python 3.12 | All 59 plotting cases identical. The minimum supported NumPy, 1.25.2, is tested too. |
275
+ | Low-level renderer and font tests against Matplotlib's C++ Agg and FreeType | Renderer, path collections, TrueType and CFF glyphs and the `ft2font` API are identical |
276
+ | Embedded bitmap strikes (`EBLC`/`EBDT`) against FreeType | `FT2Font` sizes, glyph metrics and paths, `set_text` extents and `_layout` are identical for fonts in every index and image format, compound glyphs included |
277
+ | kiwi port compared with kiwisolver | 6 constrained layouts are bit-identical when kiwisolver's variables lie in memory in creation order (usual with glibc) and within 1e-12 otherwise, and 400 random systems agree within 1e-9 |
278
+ | `mpl2014` port compared with ContourPy | 3,600 line and fill results from 200 random fields are bit-identical |
279
+ | Bundled qhull compared with Matplotlib's `_qhull` | 150 point sets give identical triangles and neighbor arrays |
280
+ | Image resampling compared with Matplotlib's `_image.resample` | All 7,880 cases are bit-identical |
281
+ | Official Matplotlib gallery (0.0.1) | 508/544 scripts pixel-identical, with no runtime errors |
282
+
283
+ The [CI/CD documentation][ci-doc] describes how these checks run. The [0.0.1 validation report][release-001] covers the original full validation, including the gallery run and the remaining differences.
284
+
285
+ ## Development
286
+
287
+ You need a stable Rust toolchain, a C compiler and Python 3.11–3.15. matplotlib-rs itself supports Python 3.10, but the reference Matplotlib 3.11.2 used by the tests needs 3.11 or later. `requirements-ci.txt` pins the reference packages and build tools. On Windows, run the scripts in Git Bash, with MSVC (Visual Studio Build Tools) as the C compiler, and activate the environment with `source .venv/Scripts/activate`:
288
+
289
+ ```bash
290
+ git clone https://github.com/g21589/matplotlib-rs.git
291
+ cd matplotlib-rs
292
+ python -m venv .venv && source .venv/bin/activate
293
+ python -m pip install -r requirements-ci.txt
294
+
295
+ sh scripts/dev_build.sh --locked # build the extension into python/matplotlib_rs
296
+ sh scripts/test_rust.sh # Rust unit tests
297
+ bash scripts/ci_test.sh # the full CI suite: unit, low-level and image comparisons
298
+ ```
299
+
300
+ To use the development build directly, set `PYTHONPATH="$PWD/python"`. Test logs and images are written to `tests/output/`. To build distributions:
301
+
302
+ ```bash
303
+ maturin build --release --locked --out dist # wheel
304
+ maturin sdist --out dist # source distribution
305
+ ```
306
+
307
+ | Path | Contents |
308
+ | --- | --- |
309
+ | `python/matplotlib_rs/` | Python package with the Matplotlib-compatible API |
310
+ | `src/` | Rust core |
311
+ | `extern/qhull/` | Bundled qhull sources |
312
+ | `tests/compare/` | Cases rendered by both implementations and compared in four formats |
313
+ | `tests/unit/`, `tests/lowlevel/`, `tests/model/` | Unit tests and low-level comparison tests |
314
+ | `tests/bench/` | Benchmarks |
315
+ | `tests/gallery/` | Runner for the official Matplotlib gallery |
316
+ | `scripts/`, `tools/` | Build, test, release and vendoring helpers |
317
+ | `docs/` | Release notes, benchmark reports, CI/CD documentation |
318
+
319
+ ## Releases
320
+
321
+ Pushing a `vX.Y.Z` tag starts the release workflow:
322
+
323
+ 1. It checks that the tag and the versions in `pyproject.toml`, `Cargo.toml` and `Cargo.lock` match, and that release notes exist for that version.
324
+ 2. It runs the full CI suite and builds manylinux_2_28 x86_64 and Windows x86_64 wheels for CPython 3.10–3.15, plus a source distribution.
325
+ 3. It installs each wheel in a clean environment that has only NumPy and renders sample figures in PNG, SVG, PDF and EPS.
326
+ 4. It benchmarks 5,400 boxplots against `v0.0.1` on the same runner. The release requires identical pixels and a median build time at least 10× faster.
327
+ 5. It publishes the GitHub release with `SHA256SUMS`. PyPI then receives the same verified files through Trusted Publishing.
328
+
329
+ See the [CI/CD documentation][ci-doc] for details.
330
+
331
+ | Version | Highlights |
332
+ | --- | --- |
333
+ | [0.0.8][rn-008] | Windows wheels, CPython 3.14 and 3.15, and improved FreeType compatibility |
334
+ | [0.0.7][rn-007] | Reusable worker threads, shared vertex buffers, faster legend placement and text layout |
335
+ | [0.0.6][rn-006] | Boxplot artists created only when read; parallel drawing of large artist batches |
336
+ | [0.0.5][rn-005] | All image file reading and writing moved to Rust, with no Pillow; parallel PNG encoder |
337
+ | [0.0.4][rn-004] | Large-data speedups for bar, hist, imshow, hist2d, contour, pcolormesh and more |
338
+ | [0.0.3][rn-003] | Python 3.10 support; NumPy as the only runtime dependency |
339
+ | [0.0.2][rn-002] | Faster creation of many boxplots; GitHub Actions CI/CD |
340
+ | [0.0.1][release-001] | First release, with a full validation report |
341
+
342
+ matplotlib-rs is in early development, and version numbers follow `0.0.x`. The public API follows Matplotlib 3.11.2.
343
+
344
+ ## License
345
+
346
+ matplotlib-rs is released under the [PSF-2.0 license][license]. It contains Python code and data derived from Matplotlib and keeps Matplotlib's license and copyright notices. Bundled third-party code keeps its own license:
347
+
348
+ | Component | License |
349
+ | --- | --- |
350
+ | cycler | [BSD][lic-cycler] |
351
+ | pyparsing | [MIT][lic-pyparsing] |
352
+ | python-dateutil | [Apache-2.0 / BSD][lic-dateutil] |
353
+ | six | [MIT][lic-six] |
354
+ | qhull | [Qhull][lic-qhull] |
355
+ | libwebp (through libwebp-sys) | [BSD-3-Clause with patent grant][lic-libwebp] |
356
+ | Rust port of the kiwi solver | [BSD][lic-kiwi] |
357
+ | Rust port of ContourPy's `mpl2014` algorithm | [BSD-3-Clause][lic-contourpy] |
358
+ | Rust port of Anti-Grain Geometry 2.4 | AGG license; the notice is kept in `src/agg` |
359
+ | jpeg-encoder (JPEG encoding) | Partly derived from Independent JPEG Group code (IJG license) |
360
+ | rav1e (AVIF encoding) | BSD-2-Clause with the AOMedia patent license |
361
+
362
+ matplotlib-rs is an independent project. It isn't affiliated with or endorsed by the Matplotlib development team.
363
+
364
+ [pypi]: https://pypi.org/project/matplotlib-rs/
365
+ [ci]: https://github.com/g21589/matplotlib-rs/actions/workflows/ci.yml
366
+ [releases]: https://github.com/g21589/matplotlib-rs/releases
367
+ [readme-zh]: https://github.com/g21589/matplotlib-rs/blob/HEAD/README.zh-TW.md
368
+ [license]: https://github.com/g21589/matplotlib-rs/blob/HEAD/licenses/LICENSE_MATPLOTLIB
369
+ [mplrc]: https://github.com/g21589/matplotlib-rs/blob/HEAD/tests/mplrc/matplotlibrc
370
+ [compare]: https://github.com/g21589/matplotlib-rs/tree/HEAD/tests/compare
371
+ [ci-doc]: https://github.com/g21589/matplotlib-rs/blob/HEAD/docs/CI.md
372
+ [bench-basic]: https://github.com/g21589/matplotlib-rs/blob/HEAD/docs/benchmarks/basic-charts.md
373
+ [bench-threads]: https://github.com/g21589/matplotlib-rs/blob/HEAD/docs/benchmarks/threads-legends-lines.md
374
+ [bench-lazy]: https://github.com/g21589/matplotlib-rs/blob/HEAD/docs/benchmarks/boxplots-lazy.md
375
+ [bench-png]: https://github.com/g21589/matplotlib-rs/blob/HEAD/docs/benchmarks/png-save.md
376
+ [release-001]: https://github.com/g21589/matplotlib-rs/blob/HEAD/docs/releases/0.0.1.md
377
+ [rn-002]: https://github.com/g21589/matplotlib-rs/blob/HEAD/docs/releases/0.0.2.md
378
+ [rn-003]: https://github.com/g21589/matplotlib-rs/blob/HEAD/docs/releases/0.0.3.md
379
+ [rn-004]: https://github.com/g21589/matplotlib-rs/blob/HEAD/docs/releases/0.0.4.md
380
+ [rn-005]: https://github.com/g21589/matplotlib-rs/blob/HEAD/docs/releases/0.0.5.md
381
+ [rn-006]: https://github.com/g21589/matplotlib-rs/blob/HEAD/docs/releases/0.0.6.md
382
+ [rn-007]: https://github.com/g21589/matplotlib-rs/blob/HEAD/docs/releases/0.0.7.md
383
+ [rn-008]: https://github.com/g21589/matplotlib-rs/blob/HEAD/docs/releases/0.0.8.md
384
+ [lic-cycler]: https://github.com/g21589/matplotlib-rs/blob/HEAD/licenses/LICENSE_CYCLER
385
+ [lic-pyparsing]: https://github.com/g21589/matplotlib-rs/blob/HEAD/licenses/LICENSE_PYPARSING
386
+ [lic-dateutil]: https://github.com/g21589/matplotlib-rs/blob/HEAD/licenses/LICENSE_DATEUTIL
387
+ [lic-six]: https://github.com/g21589/matplotlib-rs/blob/HEAD/licenses/LICENSE_SIX
388
+ [lic-qhull]: https://github.com/g21589/matplotlib-rs/blob/HEAD/licenses/LICENSE_QHULL
389
+ [lic-libwebp]: https://github.com/g21589/matplotlib-rs/blob/HEAD/licenses/LICENSE_LIBWEBP
390
+ [lic-kiwi]: https://github.com/g21589/matplotlib-rs/blob/HEAD/licenses/LICENSE_KIWISOLVER
391
+ [lic-contourpy]: https://github.com/g21589/matplotlib-rs/blob/HEAD/licenses/LICENSE_CONTOURPY
392
+