aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/python/matplotlib/py2/mpl_toolkits/axes_grid/axes_grid.py
diff options
context:
space:
mode:
authorzverevgeny <zverevgeny@yandex-team.com>2025-05-13 19:00:02 +0300
committerzverevgeny <zverevgeny@yandex-team.com>2025-05-13 19:13:54 +0300
commit92e06374736aa28637dc0e706455b65c8268a5e6 (patch)
tree3df370c199ae25d308e542f02af20f43eab78f8a /contrib/python/matplotlib/py2/mpl_toolkits/axes_grid/axes_grid.py
parentdc63d5794da99c2ebe3f32914d0351d9707660b0 (diff)
downloadydb-92e06374736aa28637dc0e706455b65c8268a5e6.tar.gz
Import matplotlib
commit_hash:d59c2338025ef8fd1e1f961ed9d8d5fd52d0bd96
Diffstat (limited to 'contrib/python/matplotlib/py2/mpl_toolkits/axes_grid/axes_grid.py')
-rw-r--r--contrib/python/matplotlib/py2/mpl_toolkits/axes_grid/axes_grid.py30
1 files changed, 30 insertions, 0 deletions
diff --git a/contrib/python/matplotlib/py2/mpl_toolkits/axes_grid/axes_grid.py b/contrib/python/matplotlib/py2/mpl_toolkits/axes_grid/axes_grid.py
new file mode 100644
index 00000000000..58212ac89c4
--- /dev/null
+++ b/contrib/python/matplotlib/py2/mpl_toolkits/axes_grid/axes_grid.py
@@ -0,0 +1,30 @@
+from __future__ import (absolute_import, division, print_function,
+ unicode_literals)
+
+import mpl_toolkits.axes_grid1.axes_grid as axes_grid_orig
+from .axes_divider import LocatableAxes
+
+class CbarAxes(axes_grid_orig.CbarAxesBase, LocatableAxes):
+ def __init__(self, *kl, **kwargs):
+ orientation=kwargs.pop("orientation", None)
+ if orientation is None:
+ raise ValueError("orientation must be specified")
+ self.orientation = orientation
+ self._default_label_on = False
+ self.locator = None
+
+ super(LocatableAxes, self).__init__(*kl, **kwargs)
+
+ def cla(self):
+ super(LocatableAxes, self).cla()
+ self._config_axes()
+
+
+class Grid(axes_grid_orig.Grid):
+ _defaultLocatableAxesClass = LocatableAxes
+
+class ImageGrid(axes_grid_orig.ImageGrid):
+ _defaultLocatableAxesClass = LocatableAxes
+ _defaultCbarAxesClass = CbarAxes
+
+AxesGrid = ImageGrid