|
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")
|
@@ -1163,13 +1164,18 @@ def colorbar(self, mappable, cax=None, ax=None, use_gridspec=True, **kw):
|
1163 | 1164 |
|
1164 | 1165 | # Store the value of gca so that we can set it back later on.
|
1165 | 1166 | current_ax = self.gca()
|
1166 |
| - |
| 1167 | + artists = self._get_draw_artists(self.canvas.get_renderer()) |
| 1168 | + print('Before', artists) |
1167 | 1169 | if cax is None:
|
1168 | 1170 | if (use_gridspec and isinstance(ax, SubplotBase)
|
1169 | 1171 | and not self.get_constrained_layout()):
|
1170 | 1172 | cax, kw = cbar.make_axes_gridspec(ax, **kw)
|
1171 | 1173 | else:
|
| 1174 | + print('Here') |
1172 | 1175 | cax, kw = cbar.make_axes(ax, **kw)
|
| 1176 | + artists = self._get_draw_artists(self.canvas.get_renderer()) |
| 1177 | + print('After', artists) |
| 1178 | + print('cax out', cax) |
1173 | 1179 |
|
1174 | 1180 | # need to remove kws that cannot be passed to Colorbar
|
1175 | 1181 | NON_COLORBAR_KEYS = ['fraction', 'pad', 'shrink', 'aspect', 'anchor',
|
@@ -2021,11 +2027,6 @@ def get_axes(self):
|
2021 | 2027 | """
|
2022 | 2028 | return self._localaxes
|
2023 | 2029 |
|
2024 |
| - def add_axes(self, *args, **kwargs): |
2025 |
| - ax = super().add_axes(*args, **kwargs) |
2026 |
| - self._localaxes += [ax] |
2027 |
| - return ax |
2028 |
| - |
2029 | 2030 | axes = property(get_axes, doc="""
|
2030 | 2031 | List of axes in the Figure. You can access and modify the axes
|
2031 | 2032 | in the Figure through this list.
|
@@ -2643,12 +2644,6 @@ def set_figheight(self, val, forward=True):
|
2643 | 2644 | """
|
2644 | 2645 | self.set_size_inches(self.get_figwidth(), val, forward=forward)
|
2645 | 2646 |
|
2646 |
| - def add_axes(self, *args, **kwargs): |
2647 |
| - ax = super().add_axes(*args, **kwargs) |
2648 |
| - self._localaxes += [ax] |
2649 |
| - return ax |
2650 |
| - |
2651 |
| - |
2652 | 2647 | def clf(self, keep_observers=False):
|
2653 | 2648 | """
|
2654 | 2649 | Clear the figure.
|
@@ -2695,6 +2690,7 @@ def draw(self, renderer):
|
2695 | 2690 | return
|
2696 | 2691 |
|
2697 | 2692 | artists = self._get_draw_artists(renderer)
|
| 2693 | + print('artists', artists) |
2698 | 2694 |
|
2699 | 2695 | try:
|
2700 | 2696 | renderer.open_group('figure', gid=self.get_gid())
|
|
0 commit comments