| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -3068,9 +3068,8 @@ def _update_title_position(self, renderer): | |||
| 3068 | 3068 | top = -np.inf | |
| 3069 | 3069 | for ax in axs: | |
| 3070 | 3070 | bb = None | |
| 3071 | - xticklabel_top = any(tick.label2.get_visible() for tick in | ||
| 3072 | - [ax.xaxis.majorTicks[0], ax.xaxis.minorTicks[0]]) | ||
| 3073 | - if (xticklabel_top or ax.xaxis.get_label_position() == 'top'): | ||
| 3071 | + if (ax.xaxis.get_ticks_position() in ['top', 'unknown'] or | ||
| 3072 | + ax.xaxis.get_label_position() == 'top'): | ||
| 3074 | 3073 | bb = ax.xaxis.get_tightbbox(renderer) | |
| 3075 | 3074 | if bb is None: | |
| 3076 | 3075 | # Extent of the outline for colorbars, of the axes otherwise. | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -220,6 +220,13 @@ def test_polar_rlabel_position(): | |||
| 220 | 220 | ax.tick_params(rotation='auto') | |
| 221 | 221 | ||
| 222 | 222 | ||
| 223 | + @image_comparison(['polar_title_position.png'], style='mpl20') | ||
| 224 | + def test_polar_title_position(): | ||
| 225 | + fig = plt.figure() | ||
| 226 | + ax = fig.add_subplot(projection='polar') | ||
| 227 | + ax.set_title('foo') | ||
| 228 | + | ||
| 229 | + | ||
| 223 | 230 | @image_comparison(['polar_theta_wedge'], style='default') | |
| 224 | 231 | def test_polar_theta_limits(): | |
| 225 | 232 | r = np.arange(0, 3.0, 0.01) | |
| Back | FazBrowse Home | New Git URL |
0 commit comments