|
8 | 8 |
|
9 | 9 | `SubPanel`
|
10 | 10 | A logical figure inside a figure, usually added to a figure or parent
|
11 |
| - `SubPanel` with `.add_subpanel` or `.subpanels` methods. |
| 11 | + `SubPanel` with `.add_subpanel` or `.subpanels` methods. |
12 | 12 |
|
13 | 13 | `SubplotParams`
|
14 | 14 | Control the default spacing between subplots.
|
@@ -844,6 +844,7 @@ def _add_axes_internal(self, key, ax):
|
844 | 844 | ax._remove_method = self.delaxes
|
845 | 845 | self.stale = True
|
846 | 846 | ax.stale_callback = _stale_figure_callback
|
| 847 | + print('Adding Internal', ax) |
847 | 848 | return ax
|
848 | 849 |
|
849 | 850 | @cbook._make_keyword_only("3.3", "sharex")
|
@@ -1159,13 +1160,18 @@ def colorbar(self, mappable, cax=None, ax=None, use_gridspec=True, **kw):
|
1159 | 1160 |
|
1160 | 1161 | # Store the value of gca so that we can set it back later on.
|
1161 | 1162 | current_ax = self.gca()
|
1162 |
| - |
| 1163 | + artists = self._get_draw_artists(self.canvas.get_renderer()) |
| 1164 | + print('Before', artists) |
1163 | 1165 | if cax is None:
|
1164 | 1166 | if use_gridspec and isinstance(ax, SubplotBase) \
|
1165 | 1167 | and (not self.get_constrained_layout()):
|
1166 | 1168 | cax, kw = cbar.make_axes_gridspec(ax, **kw)
|
1167 | 1169 | else:
|
| 1170 | + print('Here') |
1168 | 1171 | cax, kw = cbar.make_axes(ax, **kw)
|
| 1172 | + artists = self._get_draw_artists(self.canvas.get_renderer()) |
| 1173 | + print('After', artists) |
| 1174 | + print('cax out', cax) |
1169 | 1175 |
|
1170 | 1176 | # need to remove kws that cannot be passed to Colorbar
|
1171 | 1177 | NON_COLORBAR_KEYS = ['fraction', 'pad', 'shrink', 'aspect', 'anchor',
|
@@ -2025,11 +2031,6 @@ def get_axes(self):
|
2025 | 2031 | """
|
2026 | 2032 | return self._localaxes
|
2027 | 2033 |
|
2028 |
| - def add_axes(self, *args, **kwargs): |
2029 |
| - ax = super().add_axes(*args, **kwargs) |
2030 |
| - self._localaxes += [ax] |
2031 |
| - return ax |
2032 |
| - |
2033 | 2034 | axes = property(get_axes, doc="""
|
2034 | 2035 | List of axes in the Figure. You can access and modify the axes
|
2035 | 2036 | in the Figure through this list.
|
@@ -2647,12 +2648,6 @@ def set_figheight(self, val, forward=True):
|
2647 | 2648 | """
|
2648 | 2649 | self.set_size_inches(self.get_figwidth(), val, forward=forward)
|
2649 | 2650 |
|
2650 |
| - def add_axes(self, *args, **kwargs): |
2651 |
| - ax = super().add_axes(*args, **kwargs) |
2652 |
| - self._localaxes += [ax] |
2653 |
| - return ax |
2654 |
| - |
2655 |
| - |
2656 | 2651 | def clf(self, keep_observers=False):
|
2657 | 2652 | """
|
2658 | 2653 | Clear the figure.
|
@@ -2699,6 +2694,7 @@ def draw(self, renderer):
|
2699 | 2694 | return
|
2700 | 2695 |
|
2701 | 2696 | artists = self._get_draw_artists(renderer)
|
| 2697 | + print('artists', artists) |
2702 | 2698 |
|
2703 | 2699 | try:
|
2704 | 2700 | renderer.open_group('figure', gid=self.get_gid())
|
|
0 commit comments