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.
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.cp313-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,27 @@
1
+ """Run a script with matplotlib replaced by matplotlib_rs.
2
+
3
+ Usage: python -m matplotlib_rs script.py [args...]
4
+ python -m matplotlib_rs -m module [args...]
5
+ """
6
+ import runpy
7
+ import sys
8
+
9
+
10
+ def main():
11
+ import matplotlib_rs
12
+ matplotlib_rs.install()
13
+ args = sys.argv[1:]
14
+ if not args:
15
+ print(__doc__)
16
+ return 2
17
+ if args[0] == "-m":
18
+ sys.argv = args[1:]
19
+ runpy.run_module(args[1], run_name="__main__", alter_sys=True)
20
+ else:
21
+ sys.argv = args
22
+ runpy.run_path(args[0], run_name="__main__")
23
+ return 0
24
+
25
+
26
+ if __name__ == "__main__":
27
+ sys.exit(main())
matplotlib_rs/_afm.py ADDED
@@ -0,0 +1,500 @@
1
+ # Vendored from matplotlib 3.11 (see licenses/LICENSE_MATPLOTLIB), adapted for matplotlib_rs.
2
+ """
3
+ A Python interface to Adobe Font Metrics Files.
4
+
5
+ Although a number of other Python implementations exist, and may be more
6
+ complete than this, it was decided not to go with them because they were
7
+ either:
8
+
9
+ 1) copyrighted or used a non-BSD compatible license
10
+ 2) had too many dependencies and a free standing lib was needed
11
+ 3) did more than needed and it was easier to write afresh rather than
12
+ figure out how to get just what was needed.
13
+
14
+ It is pretty easy to use, and has no external dependencies:
15
+
16
+ >>> import matplotlib as mpl
17
+ >>> from pathlib import Path
18
+ >>> afm_path = Path(mpl.get_data_path(), 'fonts', 'afm', 'ptmr8a.afm')
19
+ >>>
20
+ >>> from matplotlib._afm import AFM
21
+ >>> with afm_path.open('rb') as fh:
22
+ ... afm = AFM(fh)
23
+ >>> afm.get_fontname()
24
+ 'Times-Roman'
25
+
26
+ As in the Adobe Font Metrics File Format Specification, all dimensions
27
+ are given in units of 1/1000 of the scale factor (point size) of the font
28
+ being used.
29
+ """
30
+
31
+ import inspect
32
+ import logging
33
+ import re
34
+ from typing import BinaryIO, NamedTuple, TypedDict, cast
35
+
36
+ from ._mathtext_data import uni2type1
37
+ from .ft2font import CharacterCodeType, GlyphIndexType
38
+
39
+
40
+ _log = logging.getLogger(__name__)
41
+
42
+
43
+ def _to_int(x: bytes | str) -> int:
44
+ # Some AFM files have floats where we are expecting ints -- there is
45
+ # probably a better way to handle this (support floats, round rather than
46
+ # truncate). But I don't know what the best approach is now and this
47
+ # change to _to_int should at least prevent Matplotlib from crashing on
48
+ # these. JDH (2009-11-06)
49
+ return int(float(x))
50
+
51
+
52
+ def _to_float(x: bytes | str) -> float:
53
+ # Some AFM files use "," instead of "." as decimal separator -- this
54
+ # shouldn't be ambiguous (unless someone is wicked enough to use "," as
55
+ # thousands separator...).
56
+ if isinstance(x, bytes):
57
+ # Encoding doesn't really matter -- if we have codepoints >127 the call
58
+ # to float() will error anyways.
59
+ x = x.decode('latin-1')
60
+ return float(x.replace(',', '.'))
61
+
62
+
63
+ def _to_str(x: bytes) -> str:
64
+ return x.decode('utf8')
65
+
66
+
67
+ def _to_list_of_ints(s: bytes) -> list[int]:
68
+ s = s.replace(b',', b' ')
69
+ return [_to_int(val) for val in s.split()]
70
+
71
+
72
+ def _to_list_of_floats(s: bytes | str) -> list[float]:
73
+ return [_to_float(val) for val in s.split()]
74
+
75
+
76
+ def _to_bool(s: bytes) -> bool:
77
+ if s.lower().strip() in (b'false', b'0', b'no'):
78
+ return False
79
+ else:
80
+ return True
81
+
82
+
83
+ class FontMetricsHeader(TypedDict, total=False):
84
+ StartFontMetrics: float
85
+ FontName: str
86
+ FullName: str
87
+ FamilyName: str
88
+ Weight: str
89
+ ItalicAngle: float
90
+ IsFixedPitch: bool
91
+ FontBBox: list[int]
92
+ UnderlinePosition: float
93
+ UnderlineThickness: float
94
+ Version: str
95
+ # Some AFM files have non-ASCII characters (which are not allowed by the spec).
96
+ # Given that there is actually no public API to even access this field, just return
97
+ # it as straight bytes.
98
+ Notice: bytes
99
+ EncodingScheme: str
100
+ CapHeight: float # Is the second version a mistake, or
101
+ Capheight: float # do some AFM files contain 'Capheight'? -JKS
102
+ XHeight: float
103
+ Ascender: float
104
+ Descender: float
105
+ StdHW: float
106
+ StdVW: float
107
+ StartCharMetrics: int
108
+ CharacterSet: str
109
+ Characters: int
110
+
111
+
112
+ def _parse_header(fh: BinaryIO) -> FontMetricsHeader:
113
+ """
114
+ Read the font metrics header (up to the char metrics).
115
+
116
+ Returns
117
+ -------
118
+ dict
119
+ A dictionary mapping *key* to *val*. Dictionary keys are:
120
+
121
+ StartFontMetrics, FontName, FullName, FamilyName, Weight, ItalicAngle,
122
+ IsFixedPitch, FontBBox, UnderlinePosition, UnderlineThickness, Version,
123
+ Notice, EncodingScheme, CapHeight, XHeight, Ascender, Descender,
124
+ StartCharMetrics
125
+
126
+ *val* will be converted to the appropriate Python type as necessary, e.g.,:
127
+
128
+ * 'False' -> False
129
+ * '0' -> 0
130
+ * '-168 -218 1000 898' -> [-168, -218, 1000, 898]
131
+ """
132
+ header_converters = {
133
+ bool: _to_bool,
134
+ bytes: lambda x: x,
135
+ float: _to_float,
136
+ int: _to_int,
137
+ list[int]: _to_list_of_ints,
138
+ str: _to_str,
139
+ }
140
+ header_value_types = inspect.get_annotations(FontMetricsHeader)
141
+ d: FontMetricsHeader = {}
142
+ first_line = True
143
+ for line in fh:
144
+ line = line.rstrip()
145
+ if line.startswith(b'Comment'):
146
+ continue
147
+ lst = line.split(b' ', 1)
148
+ key = lst[0]
149
+ if first_line:
150
+ # AFM spec, Section 4: The StartFontMetrics keyword
151
+ # [followed by a version number] must be the first line in
152
+ # the file, and the EndFontMetrics keyword must be the
153
+ # last non-empty line in the file. We just check the
154
+ # first header entry.
155
+ if key != b'StartFontMetrics':
156
+ raise RuntimeError('Not an AFM file')
157
+ first_line = False
158
+ if len(lst) == 2:
159
+ val = lst[1]
160
+ else:
161
+ val = b''
162
+ try:
163
+ key_str = _to_str(key)
164
+ value_type = header_value_types[key_str]
165
+ except (KeyError, UnicodeDecodeError):
166
+ _log.error("Found an unknown keyword in AFM header (was %r)", key)
167
+ continue
168
+ try:
169
+ converter = header_converters[value_type]
170
+ d[key_str] = converter(val) # type: ignore[literal-required]
171
+ except ValueError:
172
+ _log.error('Value error parsing header in AFM: %r, %r', key, val)
173
+ continue
174
+ if key == b'StartCharMetrics':
175
+ break
176
+ else:
177
+ raise RuntimeError('Bad parse')
178
+ return d
179
+
180
+
181
+ class CharMetrics(NamedTuple):
182
+ """
183
+ Represents the character metrics of a single character.
184
+
185
+ Notes
186
+ -----
187
+ The fields do currently only describe a subset of character metrics
188
+ information defined in the AFM standard.
189
+ """
190
+
191
+ width: float
192
+ name: str
193
+ bbox: tuple[int, int, int, int]
194
+
195
+
196
+ CharMetrics.width.__doc__ = """The character width (WX)."""
197
+ CharMetrics.name.__doc__ = """The character name (N)."""
198
+ CharMetrics.bbox.__doc__ = """
199
+ The bbox of the character (B) as a tuple (*llx*, *lly*, *urx*, *ury*)."""
200
+
201
+
202
+ def _parse_char_metrics(fh: BinaryIO) -> tuple[dict[CharacterCodeType, CharMetrics],
203
+ dict[str, CharMetrics]]:
204
+ """
205
+ Parse the given filehandle for character metrics information.
206
+
207
+ It is assumed that the file cursor is on the line behind 'StartCharMetrics'.
208
+
209
+ Returns
210
+ -------
211
+ ascii_d : dict
212
+ A mapping "ASCII num of the character" to `.CharMetrics`.
213
+ name_d : dict
214
+ A mapping "character name" to `.CharMetrics`.
215
+
216
+ Notes
217
+ -----
218
+ This function is incomplete per the standard, but thus far parses
219
+ all the sample afm files tried.
220
+ """
221
+ required_keys = {'C', 'WX', 'N', 'B'}
222
+
223
+ ascii_d: dict[CharacterCodeType, CharMetrics] = {}
224
+ name_d: dict[str, CharMetrics] = {}
225
+ for bline in fh:
226
+ # We are defensively letting values be utf8. The spec requires
227
+ # ascii, but there are non-compliant fonts in circulation
228
+ line = _to_str(bline.rstrip())
229
+ if line.startswith('EndCharMetrics'):
230
+ return ascii_d, name_d
231
+ # Split the metric line into a dictionary, keyed by metric identifiers
232
+ vals = dict(s.strip().split(' ', 1) for s in line.split(';') if s)
233
+ # There may be other metrics present, but only these are needed
234
+ if not required_keys.issubset(vals):
235
+ raise RuntimeError('Bad char metrics line: %s' % line)
236
+ num = _to_int(vals['C'])
237
+ wx = _to_float(vals['WX'])
238
+ name = vals['N']
239
+ bbox = tuple(map(int, _to_list_of_floats(vals['B'])))
240
+ if len(bbox) != 4:
241
+ raise RuntimeError(f'Bad parse: bbox has {len(bbox)} elements, should be 4')
242
+ metrics = CharMetrics(wx, name, bbox)
243
+ # Workaround: If the character name is 'Euro', give it the
244
+ # corresponding character code, according to WinAnsiEncoding (see PDF
245
+ # Reference).
246
+ if name == 'Euro':
247
+ num = 128
248
+ elif name == 'minus':
249
+ num = ord("\N{MINUS SIGN}") # 0x2212
250
+ if num != -1:
251
+ ascii_d[num] = metrics
252
+ name_d[name] = metrics
253
+ raise RuntimeError('Bad parse')
254
+
255
+
256
+ def _parse_kern_pairs(fh: BinaryIO) -> dict[tuple[str, str], float]:
257
+ """
258
+ Return a kern pairs dictionary.
259
+
260
+ Returns
261
+ -------
262
+ dict
263
+ Keys are (*char1*, *char2*) tuples and values are the kern pair value. For
264
+ example, a kern pairs line like ``KPX A y -50`` will be represented as::
265
+
266
+ d['A', 'y'] = -50
267
+ """
268
+ line = next(fh)
269
+ if not line.startswith(b'StartKernPairs'):
270
+ raise RuntimeError(f'Bad start of kern pairs data: {line!r}')
271
+
272
+ d: dict[tuple[str, str], float] = {}
273
+ for line in fh:
274
+ line = line.rstrip()
275
+ if not line:
276
+ continue
277
+ if line.startswith(b'EndKernPairs'):
278
+ next(fh) # EndKernData
279
+ return d
280
+ vals = line.split()
281
+ if len(vals) != 4 or vals[0] != b'KPX':
282
+ raise RuntimeError(f'Bad kern pairs line: {line!r}')
283
+ c1, c2, val = _to_str(vals[1]), _to_str(vals[2]), _to_float(vals[3])
284
+ d[(c1, c2)] = val
285
+ raise RuntimeError('Bad kern pairs parse')
286
+
287
+
288
+ class CompositePart(NamedTuple):
289
+ """Represents the information on a composite element of a composite char."""
290
+
291
+ name: bytes
292
+ dx: float
293
+ dy: float
294
+
295
+
296
+ CompositePart.name.__doc__ = """Name of the part, e.g. 'acute'."""
297
+ CompositePart.dx.__doc__ = """x-displacement of the part from the origin."""
298
+ CompositePart.dy.__doc__ = """y-displacement of the part from the origin."""
299
+
300
+
301
+ def _parse_composites(fh: BinaryIO) -> dict[bytes, list[CompositePart]]:
302
+ """
303
+ Parse the given filehandle for composites information.
304
+
305
+ It is assumed that the file cursor is on the line behind 'StartComposites'.
306
+
307
+ Returns
308
+ -------
309
+ dict
310
+ A dict mapping composite character names to a parts list. The parts
311
+ list is a list of `.CompositePart` entries describing the parts of
312
+ the composite.
313
+
314
+ Examples
315
+ --------
316
+ A composite definition line::
317
+
318
+ CC Aacute 2 ; PCC A 0 0 ; PCC acute 160 170 ;
319
+
320
+ will be represented as::
321
+
322
+ composites[b'Aacute'] = [CompositePart(name=b'A', dx=0, dy=0),
323
+ CompositePart(name=b'acute', dx=160, dy=170)]
324
+
325
+ """
326
+ composites: dict[bytes, list[CompositePart]] = {}
327
+ for line in fh:
328
+ line = line.rstrip()
329
+ if not line:
330
+ continue
331
+ if line.startswith(b'EndComposites'):
332
+ return composites
333
+ vals = line.split(b';')
334
+ cc = vals[0].split()
335
+ name, _num_parts = cc[1], _to_int(cc[2])
336
+ if len(vals) != _num_parts + 2: # First element is 'CC', last is empty.
337
+ raise RuntimeError(f'Bad composites parse: expected {_num_parts} parts, '
338
+ f'but got {len(vals) - 2}')
339
+ pccParts = []
340
+ for s in vals[1:-1]:
341
+ pcc = s.split()
342
+ part = CompositePart(pcc[1], _to_float(pcc[2]), _to_float(pcc[3]))
343
+ pccParts.append(part)
344
+ composites[name] = pccParts
345
+
346
+ raise RuntimeError('Bad composites parse')
347
+
348
+
349
+ def _parse_optional(fh: BinaryIO) -> tuple[dict[tuple[str, str], float],
350
+ dict[bytes, list[CompositePart]]]:
351
+ """
352
+ Parse the optional fields for kern pair data and composites.
353
+
354
+ Returns
355
+ -------
356
+ kern_data : dict
357
+ A dict containing kerning information. May be empty.
358
+ See `._parse_kern_pairs`.
359
+ composites : dict
360
+ A dict containing composite information. May be empty.
361
+ See `._parse_composites`.
362
+ """
363
+ kern_data: dict[tuple[str, str], float] = {}
364
+ composites: dict[bytes, list[CompositePart]] = {}
365
+ for line in fh:
366
+ line = line.rstrip()
367
+ if not line:
368
+ continue
369
+ match line.split()[0]:
370
+ case b'StartKernData':
371
+ kern_data = _parse_kern_pairs(fh)
372
+ case b'StartComposites':
373
+ composites = _parse_composites(fh)
374
+
375
+ return kern_data, composites
376
+
377
+
378
+ class AFM:
379
+
380
+ def __init__(self, fh: BinaryIO):
381
+ """Parse the AFM file in file object *fh*."""
382
+ self._header = _parse_header(fh)
383
+ self._metrics, self._metrics_by_name = _parse_char_metrics(fh)
384
+ self._kern, self._composite = _parse_optional(fh)
385
+
386
+ def get_str_bbox_and_descent(self, s: str) -> tuple[int, int, float, int, int]:
387
+ """Return the string bounding box and the maximal descent."""
388
+ if not len(s):
389
+ return 0, 0, 0, 0, 0
390
+ total_width = 0.0
391
+ namelast = ''
392
+ miny = 1_000_000_000
393
+ maxy = 0
394
+ left = 0
395
+ for c in s:
396
+ if c == '\n':
397
+ continue
398
+ name = uni2type1.get(ord(c), f"uni{ord(c):04X}")
399
+ try:
400
+ wx, _, bbox = self._metrics_by_name[name]
401
+ except KeyError:
402
+ name = 'question'
403
+ wx, _, bbox = self._metrics_by_name[name]
404
+ total_width += wx + self._kern.get((namelast, name), 0)
405
+ l, b, w, h = bbox
406
+ left = min(left, l)
407
+ miny = min(miny, b)
408
+ maxy = max(maxy, b + h)
409
+
410
+ namelast = name
411
+
412
+ return left, miny, total_width, maxy - miny, -miny
413
+
414
+ def get_glyph_name(self, # For consistency with FT2Font.
415
+ glyph_ind: GlyphIndexType) -> str:
416
+ """Get the name of the glyph, i.e., ord(';') is 'semicolon'."""
417
+ return self._metrics[cast(CharacterCodeType, glyph_ind)].name
418
+
419
+ def get_char_index(self, # For consistency with FT2Font.
420
+ c: CharacterCodeType) -> GlyphIndexType:
421
+ """
422
+ Return the glyph index corresponding to a character code point.
423
+
424
+ Note, for AFM fonts, we treat the glyph index the same as the codepoint.
425
+ """
426
+ return cast(GlyphIndexType, c)
427
+
428
+ def get_width_char(self, c: CharacterCodeType) -> float:
429
+ """Get the width of the character code from the character metric WX field."""
430
+ return self._metrics[c].width
431
+
432
+ def get_width_from_char_name(self, name: str) -> float:
433
+ """Get the width of the character from a type1 character name."""
434
+ return self._metrics_by_name[name].width
435
+
436
+ def get_kern_dist_from_name(self, name1: str, name2: str) -> float:
437
+ """
438
+ Return the kerning pair distance (possibly 0) for chars *name1* and *name2*.
439
+ """
440
+ return self._kern.get((name1, name2), 0)
441
+
442
+ def get_fontname(self) -> str:
443
+ """Return the font name, e.g., 'Times-Roman'."""
444
+ return self._header['FontName']
445
+
446
+ @property
447
+ def postscript_name(self) -> str: # For consistency with FT2Font.
448
+ return self.get_fontname()
449
+
450
+ def get_fullname(self) -> str:
451
+ """Return the font full name, e.g., 'Times-Roman'."""
452
+ name = self._header.get('FullName')
453
+ if name is None: # use FontName as a substitute
454
+ name = self._header['FontName']
455
+ return name
456
+
457
+ def get_familyname(self) -> str:
458
+ """Return the font family name, e.g., 'Times'."""
459
+ name = self._header.get('FamilyName')
460
+ if name is not None:
461
+ return name
462
+
463
+ # FamilyName not specified so we'll make a guess
464
+ name = self.get_fullname()
465
+ extras = (r'(?i)([ -](regular|plain|italic|oblique|bold|semibold|'
466
+ r'light|ultralight|extra|condensed))+$')
467
+ return re.sub(extras, '', name)
468
+
469
+ @property
470
+ def family_name(self) -> str: # For consistency with FT2Font.
471
+ """The font family name, e.g., 'Times'."""
472
+ return self.get_familyname()
473
+
474
+ def get_weight(self) -> str:
475
+ """Return the font weight, e.g., 'Bold' or 'Roman'."""
476
+ return self._header['Weight']
477
+
478
+ def get_angle(self) -> float:
479
+ """Return the fontangle as float."""
480
+ return self._header['ItalicAngle']
481
+
482
+ def get_ascender(self) -> float:
483
+ """Return the ascent as float."""
484
+ return self._header['Ascender']
485
+
486
+ def get_capheight(self) -> float:
487
+ """Return the cap height as float."""
488
+ return self._header['CapHeight']
489
+
490
+ def get_descender(self) -> float:
491
+ """Return the descent as float."""
492
+ return self._header['Descender']
493
+
494
+ def get_xheight(self) -> float:
495
+ """Return the xheight as float."""
496
+ return self._header['XHeight']
497
+
498
+ def get_underline_thickness(self) -> float:
499
+ """Return the underline thickness as float."""
500
+ return self._header['UnderlineThickness']