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,549 @@
1
+ # Vendored from matplotlib 3.11 (see licenses/LICENSE_MATPLOTLIB), adapted for matplotlib_rs.
2
+ """
3
+ A layoutgrid is a nrows by ncols set of boxes, meant to be used by
4
+ `._constrained_layout`, each box is analogous to a subplotspec element of
5
+ a gridspec.
6
+
7
+ Each box is defined by left[ncols], right[ncols], bottom[nrows] and top[nrows],
8
+ and by two editable margins for each side. The main margin gets its value
9
+ set by the size of ticklabels, titles, etc on each Axes that is in the figure.
10
+ The outer margin is the padding around the Axes, and space for any
11
+ colorbars.
12
+
13
+ The "inner" widths and heights of these boxes are then constrained to be the
14
+ same (relative the values of `width_ratios[ncols]` and `height_ratios[nrows]`).
15
+
16
+ The layoutgrid is then constrained to be contained within a parent layoutgrid,
17
+ its column(s) and row(s) specified when it is created.
18
+ """
19
+
20
+ import itertools
21
+ import logging
22
+ import numpy as np
23
+
24
+ import matplotlib_rs as mpl
25
+ import matplotlib_rs.patches as mpatches
26
+ from matplotlib_rs.transforms import Bbox
27
+ from matplotlib_rs import _kiwi
28
+
29
+ kiwi = _kiwi.load() # the Rust port of kiwi (or kiwisolver, see _kiwi.load)
30
+ _log = logging.getLogger(__name__)
31
+
32
+
33
+ class LayoutGrid:
34
+ """
35
+ Analogous to a gridspec, and contained in another LayoutGrid.
36
+ """
37
+
38
+ def __init__(self, parent=None, parent_pos=(0, 0),
39
+ parent_inner=False, name='', ncols=1, nrows=1,
40
+ h_pad=None, w_pad=None, width_ratios=None,
41
+ height_ratios=None):
42
+ Variable = kiwi.Variable
43
+ self.parent_pos = parent_pos
44
+ self.parent_inner = parent_inner
45
+ self.name = name + seq_id()
46
+ if isinstance(parent, LayoutGrid):
47
+ self.name = f'{parent.name}.{self.name}'
48
+ self.nrows = nrows
49
+ self.ncols = ncols
50
+ self.height_ratios = np.atleast_1d(height_ratios)
51
+ if height_ratios is None:
52
+ self.height_ratios = np.ones(nrows)
53
+ self.width_ratios = np.atleast_1d(width_ratios)
54
+ if width_ratios is None:
55
+ self.width_ratios = np.ones(ncols)
56
+
57
+ sn = self.name + '_'
58
+ if not isinstance(parent, LayoutGrid):
59
+ # parent can be a rect if not a LayoutGrid
60
+ # allows specifying a rectangle to contain the layout.
61
+ self.solver = kiwi.Solver()
62
+ else:
63
+ parent.add_child(self, *parent_pos)
64
+ self.solver = parent.solver
65
+ # keep track of artist associated w/ this layout. Can be none
66
+ self.artists = np.empty((nrows, ncols), dtype=object)
67
+ self.children = np.empty((nrows, ncols), dtype=object)
68
+
69
+ self.margins = {}
70
+ self.margin_vals = {}
71
+ # all the boxes in each column share the same left/right margins:
72
+ for todo in ['left', 'right', 'leftcb', 'rightcb']:
73
+ # track the value so we can change only if a margin is larger
74
+ # than the current value
75
+ self.margin_vals[todo] = np.zeros(ncols)
76
+
77
+ sol = self.solver
78
+
79
+ self.lefts = [Variable(f'{sn}lefts[{i}]') for i in range(ncols)]
80
+ self.rights = [Variable(f'{sn}rights[{i}]') for i in range(ncols)]
81
+ for todo in ['left', 'right', 'leftcb', 'rightcb']:
82
+ self.margins[todo] = [Variable(f'{sn}margins[{todo}][{i}]')
83
+ for i in range(ncols)]
84
+ for i in range(ncols):
85
+ sol.addEditVariable(self.margins[todo][i], 'strong')
86
+
87
+ for todo in ['bottom', 'top', 'bottomcb', 'topcb']:
88
+ self.margins[todo] = np.empty((nrows), dtype=object)
89
+ self.margin_vals[todo] = np.zeros(nrows)
90
+
91
+ self.bottoms = [Variable(f'{sn}bottoms[{i}]') for i in range(nrows)]
92
+ self.tops = [Variable(f'{sn}tops[{i}]') for i in range(nrows)]
93
+ for todo in ['bottom', 'top', 'bottomcb', 'topcb']:
94
+ self.margins[todo] = [Variable(f'{sn}margins[{todo}][{i}]')
95
+ for i in range(nrows)]
96
+ for i in range(nrows):
97
+ sol.addEditVariable(self.margins[todo][i], 'strong')
98
+
99
+ # set these margins to zero by default. They will be edited as
100
+ # children are filled.
101
+ self.reset_margins()
102
+ self.add_constraints(parent)
103
+
104
+ self.h_pad = h_pad
105
+ self.w_pad = w_pad
106
+
107
+ def __repr__(self):
108
+ str = f'LayoutBox: {self.name:25s} {self.nrows}x{self.ncols},\n'
109
+ for i in range(self.nrows):
110
+ for j in range(self.ncols):
111
+ str += f'{i}, {j}: '\
112
+ f'L{self.lefts[j].value():1.3f}, ' \
113
+ f'B{self.bottoms[i].value():1.3f}, ' \
114
+ f'R{self.rights[j].value():1.3f}, ' \
115
+ f'T{self.tops[i].value():1.3f}, ' \
116
+ f'ML{self.margins["left"][j].value():1.3f}, ' \
117
+ f'MR{self.margins["right"][j].value():1.3f}, ' \
118
+ f'MB{self.margins["bottom"][i].value():1.3f}, ' \
119
+ f'MT{self.margins["top"][i].value():1.3f}, \n'
120
+ return str
121
+
122
+ def reset_margins(self):
123
+ """
124
+ Reset all the margins to zero. Must do this after changing
125
+ figure size, for instance, because the relative size of the
126
+ axes labels etc changes.
127
+ """
128
+ for todo in ['left', 'right', 'bottom', 'top',
129
+ 'leftcb', 'rightcb', 'bottomcb', 'topcb']:
130
+ self.edit_margins(todo, 0.0)
131
+
132
+ def add_constraints(self, parent):
133
+ # define self-consistent constraints
134
+ self.hard_constraints()
135
+ # define relationship with parent layoutgrid:
136
+ self.parent_constraints(parent)
137
+ # define relative widths of the grid cells to each other
138
+ # and stack horizontally and vertically.
139
+ self.grid_constraints()
140
+
141
+ def hard_constraints(self):
142
+ """
143
+ These are the redundant constraints, plus ones that make the
144
+ rest of the code easier.
145
+ """
146
+ for i in range(self.ncols):
147
+ hc = [self.rights[i] >= self.lefts[i],
148
+ (self.rights[i] - self.margins['right'][i] -
149
+ self.margins['rightcb'][i] >=
150
+ self.lefts[i] - self.margins['left'][i] -
151
+ self.margins['leftcb'][i])
152
+ ]
153
+ for c in hc:
154
+ self.solver.addConstraint(c | 'required')
155
+
156
+ for i in range(self.nrows):
157
+ hc = [self.tops[i] >= self.bottoms[i],
158
+ (self.tops[i] - self.margins['top'][i] -
159
+ self.margins['topcb'][i] >=
160
+ self.bottoms[i] - self.margins['bottom'][i] -
161
+ self.margins['bottomcb'][i])
162
+ ]
163
+ for c in hc:
164
+ self.solver.addConstraint(c | 'required')
165
+
166
+ def add_child(self, child, i=0, j=0):
167
+ # np.ix_ returns the cross product of i and j indices
168
+ self.children[np.ix_(np.atleast_1d(i), np.atleast_1d(j))] = child
169
+
170
+ def parent_constraints(self, parent):
171
+ # constraints that are due to the parent...
172
+ # i.e. the first column's left is equal to the
173
+ # parent's left, the last column right equal to the
174
+ # parent's right...
175
+ if not isinstance(parent, LayoutGrid):
176
+ # specify a rectangle in figure coordinates
177
+ hc = [self.lefts[0] == parent[0],
178
+ self.rights[-1] == parent[0] + parent[2],
179
+ # top and bottom reversed order...
180
+ self.tops[0] == parent[1] + parent[3],
181
+ self.bottoms[-1] == parent[1]]
182
+ else:
183
+ rows, cols = self.parent_pos
184
+ rows = np.atleast_1d(rows)
185
+ cols = np.atleast_1d(cols)
186
+
187
+ left = parent.lefts[cols[0]]
188
+ right = parent.rights[cols[-1]]
189
+ top = parent.tops[rows[0]]
190
+ bottom = parent.bottoms[rows[-1]]
191
+ if self.parent_inner:
192
+ # the layout grid is contained inside the inner
193
+ # grid of the parent.
194
+ left += parent.margins['left'][cols[0]]
195
+ left += parent.margins['leftcb'][cols[0]]
196
+ right -= parent.margins['right'][cols[-1]]
197
+ right -= parent.margins['rightcb'][cols[-1]]
198
+ top -= parent.margins['top'][rows[0]]
199
+ top -= parent.margins['topcb'][rows[0]]
200
+ bottom += parent.margins['bottom'][rows[-1]]
201
+ bottom += parent.margins['bottomcb'][rows[-1]]
202
+ hc = [self.lefts[0] == left,
203
+ self.rights[-1] == right,
204
+ # from top to bottom
205
+ self.tops[0] == top,
206
+ self.bottoms[-1] == bottom]
207
+ for c in hc:
208
+ self.solver.addConstraint(c | 'required')
209
+
210
+ def grid_constraints(self):
211
+ # constrain the ratio of the inner part of the grids
212
+ # to be the same (relative to width_ratios)
213
+
214
+ # constrain widths:
215
+ w = (self.rights[0] - self.margins['right'][0] -
216
+ self.margins['rightcb'][0])
217
+ w = (w - self.lefts[0] - self.margins['left'][0] -
218
+ self.margins['leftcb'][0])
219
+ w0 = w / self.width_ratios[0]
220
+ # from left to right
221
+ for i in range(1, self.ncols):
222
+ w = (self.rights[i] - self.margins['right'][i] -
223
+ self.margins['rightcb'][i])
224
+ w = (w - self.lefts[i] - self.margins['left'][i] -
225
+ self.margins['leftcb'][i])
226
+ c = (w == w0 * self.width_ratios[i])
227
+ self.solver.addConstraint(c | 'strong')
228
+ # constrain the grid cells to be directly next to each other.
229
+ c = (self.rights[i - 1] == self.lefts[i])
230
+ self.solver.addConstraint(c | 'strong')
231
+
232
+ # constrain heights:
233
+ h = self.tops[0] - self.margins['top'][0] - self.margins['topcb'][0]
234
+ h = (h - self.bottoms[0] - self.margins['bottom'][0] -
235
+ self.margins['bottomcb'][0])
236
+ h0 = h / self.height_ratios[0]
237
+ # from top to bottom:
238
+ for i in range(1, self.nrows):
239
+ h = (self.tops[i] - self.margins['top'][i] -
240
+ self.margins['topcb'][i])
241
+ h = (h - self.bottoms[i] - self.margins['bottom'][i] -
242
+ self.margins['bottomcb'][i])
243
+ c = (h == h0 * self.height_ratios[i])
244
+ self.solver.addConstraint(c | 'strong')
245
+ # constrain the grid cells to be directly above each other.
246
+ c = (self.bottoms[i - 1] == self.tops[i])
247
+ self.solver.addConstraint(c | 'strong')
248
+
249
+ # Margin editing: The margins are variable and meant to
250
+ # contain things of a fixed size like axes labels, tick labels, titles
251
+ # etc
252
+ def edit_margin(self, todo, size, cell):
253
+ """
254
+ Change the size of the margin for one cell.
255
+
256
+ Parameters
257
+ ----------
258
+ todo : string (one of 'left', 'right', 'bottom', 'top')
259
+ margin to alter.
260
+
261
+ size : float
262
+ Size of the margin. If it is larger than the existing minimum it
263
+ updates the margin size. Fraction of figure size.
264
+
265
+ cell : int
266
+ Cell column or row to edit.
267
+ """
268
+ self.solver.suggestValue(self.margins[todo][cell], size)
269
+ self.margin_vals[todo][cell] = size
270
+
271
+ def edit_margin_min(self, todo, size, cell=0):
272
+ """
273
+ Change the minimum size of the margin for one cell.
274
+
275
+ Parameters
276
+ ----------
277
+ todo : string (one of 'left', 'right', 'bottom', 'top')
278
+ margin to alter.
279
+
280
+ size : float
281
+ Minimum size of the margin . If it is larger than the
282
+ existing minimum it updates the margin size. Fraction of
283
+ figure size.
284
+
285
+ cell : int
286
+ Cell column or row to edit.
287
+ """
288
+
289
+ if size > self.margin_vals[todo][cell]:
290
+ self.edit_margin(todo, size, cell)
291
+
292
+ def edit_margins(self, todo, size):
293
+ """
294
+ Change the size of all the margin of all the cells in the layout grid.
295
+
296
+ Parameters
297
+ ----------
298
+ todo : string (one of 'left', 'right', 'bottom', 'top')
299
+ margin to alter.
300
+
301
+ size : float
302
+ Size to set the margins. Fraction of figure size.
303
+ """
304
+
305
+ for i in range(len(self.margin_vals[todo])):
306
+ self.edit_margin(todo, size, i)
307
+
308
+ def edit_all_margins_min(self, todo, size):
309
+ """
310
+ Change the minimum size of all the margin of all
311
+ the cells in the layout grid.
312
+
313
+ Parameters
314
+ ----------
315
+ todo : {'left', 'right', 'bottom', 'top'}
316
+ The margin to alter.
317
+
318
+ size : float
319
+ Minimum size of the margin. If it is larger than the
320
+ existing minimum it updates the margin size. Fraction of
321
+ figure size.
322
+ """
323
+
324
+ for i in range(len(self.margin_vals[todo])):
325
+ self.edit_margin_min(todo, size, i)
326
+
327
+ def edit_outer_margin_mins(self, margin, ss):
328
+ """
329
+ Edit all four margin minimums in one statement.
330
+
331
+ Parameters
332
+ ----------
333
+ margin : dict
334
+ size of margins in a dict with keys 'left', 'right', 'bottom',
335
+ 'top'
336
+
337
+ ss : SubplotSpec
338
+ defines the subplotspec these margins should be applied to
339
+ """
340
+
341
+ self.edit_margin_min('left', margin['left'], ss.colspan.start)
342
+ self.edit_margin_min('leftcb', margin['leftcb'], ss.colspan.start)
343
+ self.edit_margin_min('right', margin['right'], ss.colspan.stop - 1)
344
+ self.edit_margin_min('rightcb', margin['rightcb'], ss.colspan.stop - 1)
345
+ # rows are from the top down:
346
+ self.edit_margin_min('top', margin['top'], ss.rowspan.start)
347
+ self.edit_margin_min('topcb', margin['topcb'], ss.rowspan.start)
348
+ self.edit_margin_min('bottom', margin['bottom'], ss.rowspan.stop - 1)
349
+ self.edit_margin_min('bottomcb', margin['bottomcb'],
350
+ ss.rowspan.stop - 1)
351
+
352
+ def get_margins(self, todo, col):
353
+ """Return the margin at this position"""
354
+ return self.margin_vals[todo][col]
355
+
356
+ def get_outer_bbox(self, rows=0, cols=0):
357
+ """
358
+ Return the outer bounding box of the subplot specs
359
+ given by rows and cols. rows and cols can be spans.
360
+ """
361
+ rows = np.atleast_1d(rows)
362
+ cols = np.atleast_1d(cols)
363
+
364
+ bbox = Bbox.from_extents(
365
+ self.lefts[cols[0]].value(),
366
+ self.bottoms[rows[-1]].value(),
367
+ self.rights[cols[-1]].value(),
368
+ self.tops[rows[0]].value())
369
+ return bbox
370
+
371
+ def get_inner_bbox(self, rows=0, cols=0):
372
+ """
373
+ Return the inner bounding box of the subplot specs
374
+ given by rows and cols. rows and cols can be spans.
375
+ """
376
+ rows = np.atleast_1d(rows)
377
+ cols = np.atleast_1d(cols)
378
+
379
+ bbox = Bbox.from_extents(
380
+ (self.lefts[cols[0]].value() +
381
+ self.margins['left'][cols[0]].value() +
382
+ self.margins['leftcb'][cols[0]].value()),
383
+ (self.bottoms[rows[-1]].value() +
384
+ self.margins['bottom'][rows[-1]].value() +
385
+ self.margins['bottomcb'][rows[-1]].value()),
386
+ (self.rights[cols[-1]].value() -
387
+ self.margins['right'][cols[-1]].value() -
388
+ self.margins['rightcb'][cols[-1]].value()),
389
+ (self.tops[rows[0]].value() -
390
+ self.margins['top'][rows[0]].value() -
391
+ self.margins['topcb'][rows[0]].value())
392
+ )
393
+ return bbox
394
+
395
+ def get_bbox_for_cb(self, rows=0, cols=0):
396
+ """
397
+ Return the bounding box that includes the
398
+ decorations but, *not* the colorbar...
399
+ """
400
+ rows = np.atleast_1d(rows)
401
+ cols = np.atleast_1d(cols)
402
+
403
+ bbox = Bbox.from_extents(
404
+ (self.lefts[cols[0]].value() +
405
+ self.margins['leftcb'][cols[0]].value()),
406
+ (self.bottoms[rows[-1]].value() +
407
+ self.margins['bottomcb'][rows[-1]].value()),
408
+ (self.rights[cols[-1]].value() -
409
+ self.margins['rightcb'][cols[-1]].value()),
410
+ (self.tops[rows[0]].value() -
411
+ self.margins['topcb'][rows[0]].value())
412
+ )
413
+ return bbox
414
+
415
+ def get_left_margin_bbox(self, rows=0, cols=0):
416
+ """
417
+ Return the left margin bounding box of the subplot specs
418
+ given by rows and cols. rows and cols can be spans.
419
+ """
420
+ rows = np.atleast_1d(rows)
421
+ cols = np.atleast_1d(cols)
422
+
423
+ bbox = Bbox.from_extents(
424
+ (self.lefts[cols[0]].value() +
425
+ self.margins['leftcb'][cols[0]].value()),
426
+ (self.bottoms[rows[-1]].value()),
427
+ (self.lefts[cols[0]].value() +
428
+ self.margins['leftcb'][cols[0]].value() +
429
+ self.margins['left'][cols[0]].value()),
430
+ (self.tops[rows[0]].value()))
431
+ return bbox
432
+
433
+ def get_bottom_margin_bbox(self, rows=0, cols=0):
434
+ """
435
+ Return the left margin bounding box of the subplot specs
436
+ given by rows and cols. rows and cols can be spans.
437
+ """
438
+ rows = np.atleast_1d(rows)
439
+ cols = np.atleast_1d(cols)
440
+
441
+ bbox = Bbox.from_extents(
442
+ (self.lefts[cols[0]].value()),
443
+ (self.bottoms[rows[-1]].value() +
444
+ self.margins['bottomcb'][rows[-1]].value()),
445
+ (self.rights[cols[-1]].value()),
446
+ (self.bottoms[rows[-1]].value() +
447
+ self.margins['bottom'][rows[-1]].value() +
448
+ self.margins['bottomcb'][rows[-1]].value()
449
+ ))
450
+ return bbox
451
+
452
+ def get_right_margin_bbox(self, rows=0, cols=0):
453
+ """
454
+ Return the left margin bounding box of the subplot specs
455
+ given by rows and cols. rows and cols can be spans.
456
+ """
457
+ rows = np.atleast_1d(rows)
458
+ cols = np.atleast_1d(cols)
459
+
460
+ bbox = Bbox.from_extents(
461
+ (self.rights[cols[-1]].value() -
462
+ self.margins['right'][cols[-1]].value() -
463
+ self.margins['rightcb'][cols[-1]].value()),
464
+ (self.bottoms[rows[-1]].value()),
465
+ (self.rights[cols[-1]].value() -
466
+ self.margins['rightcb'][cols[-1]].value()),
467
+ (self.tops[rows[0]].value()))
468
+ return bbox
469
+
470
+ def get_top_margin_bbox(self, rows=0, cols=0):
471
+ """
472
+ Return the left margin bounding box of the subplot specs
473
+ given by rows and cols. rows and cols can be spans.
474
+ """
475
+ rows = np.atleast_1d(rows)
476
+ cols = np.atleast_1d(cols)
477
+
478
+ bbox = Bbox.from_extents(
479
+ (self.lefts[cols[0]].value()),
480
+ (self.tops[rows[0]].value() -
481
+ self.margins['topcb'][rows[0]].value()),
482
+ (self.rights[cols[-1]].value()),
483
+ (self.tops[rows[0]].value() -
484
+ self.margins['topcb'][rows[0]].value() -
485
+ self.margins['top'][rows[0]].value()))
486
+ return bbox
487
+
488
+ def update_variables(self):
489
+ """
490
+ Update the variables for the solver attached to this layoutgrid.
491
+ """
492
+ self.solver.updateVariables()
493
+
494
+ _layoutboxobjnum = itertools.count()
495
+
496
+
497
+ def seq_id():
498
+ """Generate a short sequential id for layoutbox objects."""
499
+ return '%06d' % next(_layoutboxobjnum)
500
+
501
+
502
+ def plot_children(fig, lg=None, level=0):
503
+ """Simple plotting to show where boxes are."""
504
+ if lg is None:
505
+ _layoutgrids = fig.get_layout_engine().execute(fig)
506
+ lg = _layoutgrids[fig]
507
+ colors = mpl.rcParams["axes.prop_cycle"].by_key()["color"]
508
+ col = colors[level]
509
+ for i in range(lg.nrows):
510
+ for j in range(lg.ncols):
511
+ bb = lg.get_outer_bbox(rows=i, cols=j)
512
+ fig.add_artist(
513
+ mpatches.Rectangle(bb.p0, bb.width, bb.height, linewidth=1,
514
+ edgecolor='0.7', facecolor='0.7',
515
+ alpha=0.2, transform=fig.transFigure,
516
+ zorder=-3))
517
+ bbi = lg.get_inner_bbox(rows=i, cols=j)
518
+ fig.add_artist(
519
+ mpatches.Rectangle(bbi.p0, bbi.width, bbi.height, linewidth=2,
520
+ edgecolor=col, facecolor='none',
521
+ transform=fig.transFigure, zorder=-2))
522
+
523
+ bbi = lg.get_left_margin_bbox(rows=i, cols=j)
524
+ fig.add_artist(
525
+ mpatches.Rectangle(bbi.p0, bbi.width, bbi.height, linewidth=0,
526
+ edgecolor='none', alpha=0.2,
527
+ facecolor=[0.5, 0.7, 0.5],
528
+ transform=fig.transFigure, zorder=-2))
529
+ bbi = lg.get_right_margin_bbox(rows=i, cols=j)
530
+ fig.add_artist(
531
+ mpatches.Rectangle(bbi.p0, bbi.width, bbi.height, linewidth=0,
532
+ edgecolor='none', alpha=0.2,
533
+ facecolor=[0.7, 0.5, 0.5],
534
+ transform=fig.transFigure, zorder=-2))
535
+ bbi = lg.get_bottom_margin_bbox(rows=i, cols=j)
536
+ fig.add_artist(
537
+ mpatches.Rectangle(bbi.p0, bbi.width, bbi.height, linewidth=0,
538
+ edgecolor='none', alpha=0.2,
539
+ facecolor=[0.5, 0.5, 0.7],
540
+ transform=fig.transFigure, zorder=-2))
541
+ bbi = lg.get_top_margin_bbox(rows=i, cols=j)
542
+ fig.add_artist(
543
+ mpatches.Rectangle(bbi.p0, bbi.width, bbi.height, linewidth=0,
544
+ edgecolor='none', alpha=0.2,
545
+ facecolor=[0.7, 0.2, 0.7],
546
+ transform=fig.transFigure, zorder=-2))
547
+ for ch in lg.children.flat:
548
+ if ch is not None:
549
+ plot_children(fig, ch, level=level+1)