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,565 @@
1
+ # Vendored from matplotlib 3.11 (see licenses/LICENSE_MATPLOTLIB), adapted for matplotlib_rs.
2
+ from numbers import Number
3
+ import functools
4
+ from types import MethodType
5
+
6
+ import numpy as np
7
+
8
+ from matplotlib_rs import _api, cbook
9
+ from matplotlib_rs.gridspec import SubplotSpec
10
+
11
+ from .axes_divider import Size, SubplotDivider, Divider
12
+ from .mpl_axes import Axes, SimpleAxisArtist
13
+
14
+
15
+ class CbarAxesBase:
16
+ def __init__(self, *args, orientation, **kwargs):
17
+ self.orientation = orientation
18
+ super().__init__(*args, **kwargs)
19
+
20
+ def colorbar(self, mappable, **kwargs):
21
+ return self.get_figure(root=False).colorbar(
22
+ mappable, cax=self, location=self.orientation, **kwargs)
23
+
24
+
25
+ _cbaraxes_class_factory = cbook._make_class_factory(CbarAxesBase, "Cbar{}")
26
+
27
+
28
+ class Grid:
29
+ """
30
+ A grid of Axes.
31
+
32
+ In Matplotlib, the Axes location (and size) is specified in normalized
33
+ figure coordinates. This may not be ideal for images that needs to be
34
+ displayed with a given aspect ratio; for example, it is difficult to
35
+ display multiple images of a same size with some fixed padding between
36
+ them. AxesGrid can be used in such case.
37
+
38
+ Attributes
39
+ ----------
40
+ axes_all : list of Axes
41
+ A flat list of Axes. Note that you can also access this directly
42
+ from the grid. The following is equivalent ::
43
+
44
+ grid[i] == grid.axes_all[i]
45
+ len(grid) == len(grid.axes_all)
46
+
47
+ axes_column : list of list of Axes
48
+ A 2D list of Axes where the first index is the column. This results
49
+ in the usage pattern ``grid.axes_column[col][row]``.
50
+ axes_row : list of list of Axes
51
+ A 2D list of Axes where the first index is the row. This results
52
+ in the usage pattern ``grid.axes_row[row][col]``.
53
+ axes_llc : Axes
54
+ The Axes in the lower left corner.
55
+ n_axes : int
56
+ Number of Axes in the grid.
57
+ """
58
+
59
+ _defaultAxesClass = Axes
60
+
61
+ @_api.rename_parameter("3.11", "ngrids", "n_axes")
62
+ def __init__(self, fig,
63
+ rect,
64
+ nrows_ncols,
65
+ n_axes=None,
66
+ direction="row",
67
+ axes_pad=0.02,
68
+ *,
69
+ share_all=False,
70
+ share_x=True,
71
+ share_y=True,
72
+ label_mode="L",
73
+ axes_class=None,
74
+ aspect=False,
75
+ ):
76
+ """
77
+ Parameters
78
+ ----------
79
+ fig : `.Figure`
80
+ The parent figure.
81
+ rect : (float, float, float, float), (int, int, int), int, or \
82
+ `~.SubplotSpec`
83
+ The axes position, as a ``(left, bottom, width, height)`` tuple,
84
+ as a three-digit subplot position code (e.g., ``(1, 2, 1)`` or
85
+ ``121``), or as a `~.SubplotSpec`.
86
+ nrows_ncols : (int, int)
87
+ Number of rows and columns in the grid.
88
+ n_axes : int, optional
89
+ If given, only the first *n_axes* axes in the grid are created.
90
+ direction : {"row", "column"}, default: "row"
91
+ Whether axes are created in row-major ("row by row") or
92
+ column-major order ("column by column"). This also affects the
93
+ order in which axes are accessed using indexing (``grid[index]``).
94
+ axes_pad : float or (float, float), default: 0.02
95
+ Padding or (horizontal padding, vertical padding) between axes, in
96
+ inches.
97
+ share_all : bool, default: False
98
+ Whether all axes share their x- and y-axis. Overrides *share_x*
99
+ and *share_y*.
100
+ share_x : bool, default: True
101
+ Whether all axes of a column share their x-axis.
102
+ share_y : bool, default: True
103
+ Whether all axes of a row share their y-axis.
104
+ label_mode : {"L", "1", "all", "keep"}, default: "L"
105
+ Determines which axes will get tick labels:
106
+
107
+ - "L": All axes on the left column get vertical tick labels;
108
+ all axes on the bottom row get horizontal tick labels.
109
+ - "1": Only the bottom left axes is labelled.
110
+ - "all": All axes are labelled.
111
+ - "keep": Do not do anything.
112
+
113
+ axes_class : subclass of `matplotlib.axes.Axes`, default: `.mpl_axes.Axes`
114
+ The type of Axes to create.
115
+ aspect : bool, default: False
116
+ Whether the axes aspect ratio follows the aspect ratio of the data
117
+ limits.
118
+ """
119
+ self._nrows, self._ncols = nrows_ncols
120
+
121
+ if n_axes is None:
122
+ n_axes = self._nrows * self._ncols
123
+ else:
124
+ if not 0 < n_axes <= self._nrows * self._ncols:
125
+ raise ValueError(
126
+ "n_axes must be positive and not larger than nrows*ncols")
127
+
128
+ self._horiz_pad_size, self._vert_pad_size = map(
129
+ Size.Fixed, np.broadcast_to(axes_pad, 2))
130
+
131
+ _api.check_in_list(["column", "row"], direction=direction)
132
+ self._direction = direction
133
+
134
+ if axes_class is None:
135
+ axes_class = self._defaultAxesClass
136
+ elif isinstance(axes_class, (list, tuple)):
137
+ cls, kwargs = axes_class
138
+ axes_class = functools.partial(cls, **kwargs)
139
+
140
+ kw = dict(horizontal=[], vertical=[], aspect=aspect)
141
+ if isinstance(rect, (Number, SubplotSpec)):
142
+ self._divider = SubplotDivider(fig, rect, **kw)
143
+ elif len(rect) == 3:
144
+ self._divider = SubplotDivider(fig, *rect, **kw)
145
+ elif len(rect) == 4:
146
+ self._divider = Divider(fig, rect, **kw)
147
+ else:
148
+ raise TypeError("Incorrect rect format")
149
+
150
+ rect = self._divider.get_position()
151
+
152
+ axes_array = np.full((self._nrows, self._ncols), None, dtype=object)
153
+ for i in range(n_axes):
154
+ col, row = self._get_col_row(i)
155
+ if share_all:
156
+ sharex = sharey = axes_array[0, 0]
157
+ else:
158
+ sharex = axes_array[0, col] if share_x else None
159
+ sharey = axes_array[row, 0] if share_y else None
160
+ axes_array[row, col] = axes_class(
161
+ fig, rect, sharex=sharex, sharey=sharey)
162
+ self.axes_all = axes_array.ravel(
163
+ order="C" if self._direction == "row" else "F").tolist()[:n_axes]
164
+ self.axes_row = [[ax for ax in row if ax] for row in axes_array]
165
+ self.axes_column = [[ax for ax in col if ax] for col in axes_array.T]
166
+ self.axes_llc = self.axes_column[0][-1]
167
+
168
+ self._init_locators()
169
+
170
+ for ax in self.axes_all:
171
+ fig.add_axes(ax)
172
+
173
+ self.set_label_mode(label_mode)
174
+
175
+ def _init_locators(self):
176
+ self._divider.set_horizontal(
177
+ [Size.Scaled(1), self._horiz_pad_size] * (self._ncols-1) + [Size.Scaled(1)])
178
+ self._divider.set_vertical(
179
+ [Size.Scaled(1), self._vert_pad_size] * (self._nrows-1) + [Size.Scaled(1)])
180
+ for i in range(self.n_axes):
181
+ col, row = self._get_col_row(i)
182
+ self.axes_all[i].set_axes_locator(
183
+ self._divider.new_locator(nx=2 * col, ny=2 * (self._nrows - 1 - row)))
184
+
185
+ def _get_col_row(self, n):
186
+ if self._direction == "column":
187
+ col, row = divmod(n, self._nrows)
188
+ else:
189
+ row, col = divmod(n, self._ncols)
190
+
191
+ return col, row
192
+
193
+ n_axes = property(lambda self: len(self.axes_all))
194
+ ngrids = _api.deprecated('3.11')(property(lambda self: len(self.axes_all)))
195
+
196
+ # Good to propagate __len__ if we have __getitem__
197
+ def __len__(self):
198
+ return len(self.axes_all)
199
+
200
+ def __getitem__(self, i):
201
+ return self.axes_all[i]
202
+
203
+ def get_geometry(self):
204
+ """
205
+ Return the number of rows and columns of the grid as (nrows, ncols).
206
+ """
207
+ return self._nrows, self._ncols
208
+
209
+ def set_axes_pad(self, axes_pad):
210
+ """
211
+ Set the padding between the axes.
212
+
213
+ Parameters
214
+ ----------
215
+ axes_pad : (float, float)
216
+ The padding (horizontal pad, vertical pad) in inches.
217
+ """
218
+ self._horiz_pad_size.fixed_size = axes_pad[0]
219
+ self._vert_pad_size.fixed_size = axes_pad[1]
220
+
221
+ def get_axes_pad(self):
222
+ """
223
+ Return the axes padding.
224
+
225
+ Returns
226
+ -------
227
+ hpad, vpad
228
+ Padding (horizontal pad, vertical pad) in inches.
229
+ """
230
+ return (self._horiz_pad_size.fixed_size,
231
+ self._vert_pad_size.fixed_size)
232
+
233
+ def set_aspect(self, aspect):
234
+ """Set the aspect of the SubplotDivider."""
235
+ self._divider.set_aspect(aspect)
236
+
237
+ def get_aspect(self):
238
+ """Return the aspect of the SubplotDivider."""
239
+ return self._divider.get_aspect()
240
+
241
+ def set_label_mode(self, mode):
242
+ """
243
+ Define which axes have tick labels.
244
+
245
+ Parameters
246
+ ----------
247
+ mode : {"L", "1", "all", "keep"}
248
+ The label mode:
249
+
250
+ - "L": All axes on the left column get vertical tick labels;
251
+ all axes on the bottom row get horizontal tick labels.
252
+ - "1": Only the bottom left axes is labelled.
253
+ - "all": All axes are labelled.
254
+ - "keep": Do not do anything.
255
+ """
256
+ _api.check_in_list(["all", "L", "1", "keep"], mode=mode)
257
+ if mode == "keep":
258
+ return
259
+ for i, j in np.ndindex(self._nrows, self._ncols):
260
+ try:
261
+ ax = self.axes_row[i][j]
262
+ except IndexError:
263
+ continue
264
+ if isinstance(ax.axis, MethodType):
265
+ bottom_axis = SimpleAxisArtist(ax.xaxis, 1, ax.spines["bottom"])
266
+ left_axis = SimpleAxisArtist(ax.yaxis, 1, ax.spines["left"])
267
+ else:
268
+ bottom_axis = ax.axis["bottom"]
269
+ left_axis = ax.axis["left"]
270
+ display_at_bottom = (i == self._nrows - 1 if mode == "L" else
271
+ i == self._nrows - 1 and j == 0 if mode == "1" else
272
+ True) # if mode == "all"
273
+ display_at_left = (j == 0 if mode == "L" else
274
+ i == self._nrows - 1 and j == 0 if mode == "1" else
275
+ True) # if mode == "all"
276
+ bottom_axis.toggle(ticklabels=display_at_bottom, label=display_at_bottom)
277
+ left_axis.toggle(ticklabels=display_at_left, label=display_at_left)
278
+
279
+ def get_divider(self):
280
+ return self._divider
281
+
282
+ def set_axes_locator(self, locator):
283
+ self._divider.set_locator(locator)
284
+
285
+ def get_axes_locator(self):
286
+ return self._divider.get_locator()
287
+
288
+
289
+ class ImageGrid(Grid):
290
+ """
291
+ A grid of Axes for Image display.
292
+
293
+ This class is a specialization of `~.axes_grid1.axes_grid.Grid` for displaying a
294
+ grid of images. In particular, it forces all axes in a column to share their x-axis
295
+ and all axes in a row to share their y-axis. It further provides helpers to add
296
+ colorbars to some or all axes.
297
+ """
298
+
299
+ def __init__(self, fig,
300
+ rect,
301
+ nrows_ncols,
302
+ n_axes=None,
303
+ direction="row",
304
+ axes_pad=0.02,
305
+ *,
306
+ share_all=False,
307
+ aspect=True,
308
+ label_mode="L",
309
+ cbar_mode=None,
310
+ cbar_location="right",
311
+ cbar_pad=None,
312
+ cbar_size="5%",
313
+ cbar_set_cax=True,
314
+ axes_class=None,
315
+ ):
316
+ """
317
+ Parameters
318
+ ----------
319
+ fig : `.Figure`
320
+ The parent figure.
321
+ rect : (float, float, float, float) or int
322
+ The axes position, as a ``(left, bottom, width, height)`` tuple or
323
+ as a three-digit subplot position code (e.g., "121").
324
+ nrows_ncols : (int, int)
325
+ Number of rows and columns in the grid.
326
+ n_axes : int, optional
327
+ If given, only the first *n_axes* axes in the grid are created.
328
+ direction : {"row", "column"}, default: "row"
329
+ Whether axes are created in row-major ("row by row") or
330
+ column-major order ("column by column"). This also affects the
331
+ order in which axes are accessed using indexing (``grid[index]``).
332
+ axes_pad : float or (float, float), default: 0.02in
333
+ Padding or (horizontal padding, vertical padding) between axes, in
334
+ inches.
335
+ share_all : bool, default: False
336
+ Whether all axes share their x- and y-axis. Note that in any case,
337
+ all axes in a column share their x-axis and all axes in a row share
338
+ their y-axis.
339
+ aspect : bool, default: True
340
+ Whether the axes aspect ratio follows the aspect ratio of the data
341
+ limits.
342
+ label_mode : {"L", "1", "all"}, default: "L"
343
+ Determines which axes will get tick labels:
344
+
345
+ - "L": All axes on the left column get vertical tick labels;
346
+ all axes on the bottom row get horizontal tick labels.
347
+ - "1": Only the bottom left axes is labelled.
348
+ - "all": all axes are labelled.
349
+
350
+ cbar_mode : {"each", "single", "edge", None}, default: None
351
+ Whether to create a colorbar for "each" axes, a "single" colorbar
352
+ for the entire grid, colorbars only for axes on the "edge"
353
+ determined by *cbar_location*, or no colorbars. The colorbars are
354
+ stored in the :attr:`!cbar_axes` attribute.
355
+ cbar_location : {"left", "right", "bottom", "top"}, default: "right"
356
+ cbar_pad : float, default: None
357
+ Padding between the image axes and the colorbar axes.
358
+
359
+ .. versionchanged:: 3.10
360
+ ``cbar_mode="single"`` no longer adds *axes_pad* between the axes
361
+ and the colorbar if the *cbar_location* is "left" or "bottom".
362
+
363
+ cbar_size : size specification (see `!.Size.from_any`), default: "5%"
364
+ Colorbar size.
365
+ cbar_set_cax : bool, default: True
366
+ If True, each axes in the grid has a *cax* attribute that is bound
367
+ to associated *cbar_axes*.
368
+ axes_class : subclass of `matplotlib.axes.Axes`, default: `.mpl_axes.Axes`
369
+ """
370
+ _api.check_in_list(["each", "single", "edge", None],
371
+ cbar_mode=cbar_mode)
372
+ _api.check_in_list(["left", "right", "bottom", "top"],
373
+ cbar_location=cbar_location)
374
+ self._colorbar_mode = cbar_mode
375
+ self._colorbar_location = cbar_location
376
+ self._colorbar_pad = cbar_pad
377
+ self._colorbar_size = cbar_size
378
+ # The colorbar axes are created in _init_locators().
379
+
380
+ super().__init__(
381
+ fig, rect, nrows_ncols, n_axes,
382
+ direction=direction, axes_pad=axes_pad,
383
+ share_all=share_all, share_x=True, share_y=True, aspect=aspect,
384
+ label_mode=label_mode, axes_class=axes_class)
385
+
386
+ for ax in self.cbar_axes:
387
+ fig.add_axes(ax)
388
+
389
+ if cbar_set_cax:
390
+ if self._colorbar_mode == "single":
391
+ for ax in self.axes_all:
392
+ ax.cax = self.cbar_axes[0]
393
+ elif self._colorbar_mode == "edge":
394
+ for index, ax in enumerate(self.axes_all):
395
+ col, row = self._get_col_row(index)
396
+ if self._colorbar_location in ("left", "right"):
397
+ ax.cax = self.cbar_axes[row]
398
+ else:
399
+ ax.cax = self.cbar_axes[col]
400
+ else:
401
+ for ax, cax in zip(self.axes_all, self.cbar_axes):
402
+ ax.cax = cax
403
+
404
+ def _init_locators(self):
405
+ # Slightly abusing this method to inject colorbar creation into init.
406
+
407
+ if self._colorbar_pad is None:
408
+ # horizontal or vertical arrangement?
409
+ if self._colorbar_location in ("left", "right"):
410
+ self._colorbar_pad = self._horiz_pad_size.fixed_size
411
+ else:
412
+ self._colorbar_pad = self._vert_pad_size.fixed_size
413
+ self.cbar_axes = [
414
+ _cbaraxes_class_factory(self._defaultAxesClass)(
415
+ self.axes_all[0].get_figure(root=False), self._divider.get_position(),
416
+ orientation=self._colorbar_location)
417
+ for _ in range(self.n_axes)]
418
+
419
+ cb_mode = self._colorbar_mode
420
+ cb_location = self._colorbar_location
421
+
422
+ h = []
423
+ v = []
424
+
425
+ h_ax_pos = []
426
+ h_cb_pos = []
427
+ if cb_mode == "single" and cb_location in ("left", "bottom"):
428
+ if cb_location == "left":
429
+ sz = self._nrows * Size.AxesX(self.axes_llc)
430
+ h.append(Size.from_any(self._colorbar_size, sz))
431
+ h.append(Size.from_any(self._colorbar_pad, sz))
432
+ locator = self._divider.new_locator(nx=0, ny=0, ny1=-1)
433
+ elif cb_location == "bottom":
434
+ sz = self._ncols * Size.AxesY(self.axes_llc)
435
+ v.append(Size.from_any(self._colorbar_size, sz))
436
+ v.append(Size.from_any(self._colorbar_pad, sz))
437
+ locator = self._divider.new_locator(nx=0, nx1=-1, ny=0)
438
+ for i in range(self.n_axes):
439
+ self.cbar_axes[i].set_visible(False)
440
+ self.cbar_axes[0].set_axes_locator(locator)
441
+ self.cbar_axes[0].set_visible(True)
442
+
443
+ for col, ax in enumerate(self.axes_row[0]):
444
+ if col != 0:
445
+ h.append(self._horiz_pad_size)
446
+
447
+ if ax:
448
+ sz = Size.AxesX(ax, aspect="axes", ref_ax=self.axes_all[0])
449
+ else:
450
+ sz = Size.AxesX(self.axes_all[0],
451
+ aspect="axes", ref_ax=self.axes_all[0])
452
+
453
+ if (cb_location == "left"
454
+ and (cb_mode == "each"
455
+ or (cb_mode == "edge" and col == 0))):
456
+ h_cb_pos.append(len(h))
457
+ h.append(Size.from_any(self._colorbar_size, sz))
458
+ h.append(Size.from_any(self._colorbar_pad, sz))
459
+
460
+ h_ax_pos.append(len(h))
461
+ h.append(sz)
462
+
463
+ if (cb_location == "right"
464
+ and (cb_mode == "each"
465
+ or (cb_mode == "edge" and col == self._ncols - 1))):
466
+ h.append(Size.from_any(self._colorbar_pad, sz))
467
+ h_cb_pos.append(len(h))
468
+ h.append(Size.from_any(self._colorbar_size, sz))
469
+
470
+ v_ax_pos = []
471
+ v_cb_pos = []
472
+ for row, ax in enumerate(self.axes_column[0][::-1]):
473
+ if row != 0:
474
+ v.append(self._vert_pad_size)
475
+
476
+ if ax:
477
+ sz = Size.AxesY(ax, aspect="axes", ref_ax=self.axes_all[0])
478
+ else:
479
+ sz = Size.AxesY(self.axes_all[0],
480
+ aspect="axes", ref_ax=self.axes_all[0])
481
+
482
+ if (cb_location == "bottom"
483
+ and (cb_mode == "each"
484
+ or (cb_mode == "edge" and row == 0))):
485
+ v_cb_pos.append(len(v))
486
+ v.append(Size.from_any(self._colorbar_size, sz))
487
+ v.append(Size.from_any(self._colorbar_pad, sz))
488
+
489
+ v_ax_pos.append(len(v))
490
+ v.append(sz)
491
+
492
+ if (cb_location == "top"
493
+ and (cb_mode == "each"
494
+ or (cb_mode == "edge" and row == self._nrows - 1))):
495
+ v.append(Size.from_any(self._colorbar_pad, sz))
496
+ v_cb_pos.append(len(v))
497
+ v.append(Size.from_any(self._colorbar_size, sz))
498
+
499
+ for i in range(self.n_axes):
500
+ col, row = self._get_col_row(i)
501
+ locator = self._divider.new_locator(nx=h_ax_pos[col],
502
+ ny=v_ax_pos[self._nrows-1-row])
503
+ self.axes_all[i].set_axes_locator(locator)
504
+
505
+ if cb_mode == "each":
506
+ if cb_location in ("right", "left"):
507
+ locator = self._divider.new_locator(
508
+ nx=h_cb_pos[col], ny=v_ax_pos[self._nrows - 1 - row])
509
+
510
+ elif cb_location in ("top", "bottom"):
511
+ locator = self._divider.new_locator(
512
+ nx=h_ax_pos[col], ny=v_cb_pos[self._nrows - 1 - row])
513
+
514
+ self.cbar_axes[i].set_axes_locator(locator)
515
+ elif cb_mode == "edge":
516
+ if (cb_location == "left" and col == 0
517
+ or cb_location == "right" and col == self._ncols - 1):
518
+ locator = self._divider.new_locator(
519
+ nx=h_cb_pos[0], ny=v_ax_pos[self._nrows - 1 - row])
520
+ self.cbar_axes[row].set_axes_locator(locator)
521
+ elif (cb_location == "bottom" and row == self._nrows - 1
522
+ or cb_location == "top" and row == 0):
523
+ locator = self._divider.new_locator(nx=h_ax_pos[col],
524
+ ny=v_cb_pos[0])
525
+ self.cbar_axes[col].set_axes_locator(locator)
526
+
527
+ if cb_mode == "single":
528
+ if cb_location == "right":
529
+ sz = self._nrows * Size.AxesX(self.axes_llc)
530
+ h.append(Size.from_any(self._colorbar_pad, sz))
531
+ h.append(Size.from_any(self._colorbar_size, sz))
532
+ locator = self._divider.new_locator(nx=-2, ny=0, ny1=-1)
533
+ elif cb_location == "top":
534
+ sz = self._ncols * Size.AxesY(self.axes_llc)
535
+ v.append(Size.from_any(self._colorbar_pad, sz))
536
+ v.append(Size.from_any(self._colorbar_size, sz))
537
+ locator = self._divider.new_locator(nx=0, nx1=-1, ny=-2)
538
+ if cb_location in ("right", "top"):
539
+ for i in range(self.n_axes):
540
+ self.cbar_axes[i].set_visible(False)
541
+ self.cbar_axes[0].set_axes_locator(locator)
542
+ self.cbar_axes[0].set_visible(True)
543
+ elif cb_mode == "each":
544
+ for i in range(self.n_axes):
545
+ self.cbar_axes[i].set_visible(True)
546
+ elif cb_mode == "edge":
547
+ if cb_location in ("right", "left"):
548
+ count = self._nrows
549
+ else:
550
+ count = self._ncols
551
+ for i in range(count):
552
+ self.cbar_axes[i].set_visible(True)
553
+ for j in range(i + 1, self.n_axes):
554
+ self.cbar_axes[j].set_visible(False)
555
+ else:
556
+ for i in range(self.n_axes):
557
+ self.cbar_axes[i].set_visible(False)
558
+ self.cbar_axes[i].set_position([1., 1., 0.001, 0.001],
559
+ which="active")
560
+
561
+ self._divider.set_horizontal(h)
562
+ self._divider.set_vertical(v)
563
+
564
+
565
+ AxesGrid = ImageGrid