2222from ..internals import _not_none , docstring , rcsetup , warnings
2323from ..utils import edges , units
2424from .plot import (
25+ _apply_cmap ,
26+ _apply_cycle ,
2527 _bar_wrapper ,
2628 _barh_wrapper ,
2729 _boxplot_wrapper ,
28- _cmap_changer ,
29- _cycle_changer ,
3030 _fill_between_wrapper ,
3131 _fill_betweenx_wrapper ,
3232 _get_transform ,
@@ -263,7 +263,7 @@ def __init__(self, *args, number=None, main=False, _subplotspec=None, **kwargs):
263263 ta = self .transAxes
264264 d ['abc' ] = self .text (0 , 0 , '' , transform = ta )
265265 d ['left' ] = self ._left_title # WARNING: track in case mpl changes this
266- d ['center' ] = self ._center_title
266+ d ['center' ] = self .title
267267 d ['right' ] = self ._right_title
268268 d ['upper left' ] = self .text (0 , 0 , '' , va = 'top' , ha = 'left' , transform = ta )
269269 d ['upper center' ] = self .text (0 , 0 , '' , va = 'top' , ha = 'center' , transform = ta )
@@ -1272,7 +1272,7 @@ def panel_axes(self, side, **kwargs):
12721272
12731273 @_parametric_wrapper
12741274 @_standardize_1d
1275- @_cmap_changer
1275+ @_apply_cmap
12761276 def parametric (
12771277 self , * args , values = None ,
12781278 cmap = None , norm = None , interp = 0 ,
@@ -1810,47 +1810,44 @@ def number(self, num):
18101810 raise ValueError (f'Invalid number { num !r} . Must be integer >=1.' )
18111811 self ._number = num
18121812
1813- # For consistency with _left_title, _upper_left_title, etc.
1814- _center_title = property (lambda self : self .title )
1815-
18161813 # Wrapped by special functions
18171814 # Also support redirecting to Basemap methods
18181815 text = _text_wrapper (
18191816 maxes .Axes .text
18201817 )
1821- plot = _plot_wrapper (_standardize_1d (_indicate_error (_cycle_changer (
1818+ plot = _plot_wrapper (_standardize_1d (_indicate_error (_apply_cycle (
18221819 maxes .Axes .plot
18231820 ))))
1824- scatter = _scatter_wrapper (_standardize_1d (_indicate_error (_cycle_changer (
1821+ scatter = _scatter_wrapper (_standardize_1d (_indicate_error (_apply_cycle (
18251822 maxes .Axes .scatter
18261823 ))))
1827- bar = _bar_wrapper (_standardize_1d (_indicate_error (_cycle_changer (
1824+ bar = _bar_wrapper (_standardize_1d (_indicate_error (_apply_cycle (
18281825 maxes .Axes .bar
18291826 ))))
18301827 barh = _barh_wrapper ( # calls self.bar
18311828 maxes .Axes .barh
18321829 )
1833- hist = _hist_wrapper (_standardize_1d (_cycle_changer (
1830+ hist = _hist_wrapper (_standardize_1d (_apply_cycle (
18341831 maxes .Axes .hist
18351832 )))
1836- boxplot = _boxplot_wrapper (_standardize_1d (_cycle_changer (
1833+ boxplot = _boxplot_wrapper (_standardize_1d (_apply_cycle (
18371834 maxes .Axes .boxplot
18381835 )))
1839- violinplot = _violinplot_wrapper (_standardize_1d (_indicate_error (_cycle_changer (
1836+ violinplot = _violinplot_wrapper (_standardize_1d (_indicate_error (_apply_cycle (
18401837 maxes .Axes .violinplot
18411838 ))))
1842- fill_between = _fill_between_wrapper (_standardize_1d (_cycle_changer (
1839+ fill_between = _fill_between_wrapper (_standardize_1d (_apply_cycle (
18431840 maxes .Axes .fill_between
18441841 )))
1845- fill_betweenx = _fill_betweenx_wrapper (_standardize_1d (_cycle_changer (
1842+ fill_betweenx = _fill_betweenx_wrapper (_standardize_1d (_apply_cycle (
18461843 maxes .Axes .fill_betweenx
18471844 )))
18481845
18491846 # Wrapped by cycle wrapper and standardized
1850- pie = _standardize_1d (_cycle_changer (
1847+ pie = _standardize_1d (_apply_cycle (
18511848 maxes .Axes .pie
18521849 ))
1853- step = _standardize_1d (_cycle_changer (
1850+ step = _standardize_1d (_apply_cycle (
18541851 maxes .Axes .step
18551852 ))
18561853
@@ -1867,53 +1864,53 @@ def number(self, num):
18671864
18681865 # Wrapped by cmap wrapper and standardized
18691866 # Also support redirecting to Basemap methods
1870- hexbin = _standardize_1d (_cmap_changer (
1867+ hexbin = _standardize_1d (_apply_cmap (
18711868 maxes .Axes .hexbin
18721869 ))
1873- contour = _standardize_2d (_cmap_changer (
1870+ contour = _standardize_2d (_apply_cmap (
18741871 maxes .Axes .contour
18751872 ))
1876- contourf = _standardize_2d (_cmap_changer (
1873+ contourf = _standardize_2d (_apply_cmap (
18771874 maxes .Axes .contourf
18781875 ))
1879- pcolor = _standardize_2d (_cmap_changer (
1876+ pcolor = _standardize_2d (_apply_cmap (
18801877 maxes .Axes .pcolor
18811878 ))
1882- pcolormesh = _standardize_2d (_cmap_changer (
1879+ pcolormesh = _standardize_2d (_apply_cmap (
18831880 maxes .Axes .pcolormesh
18841881 ))
1885- pcolorfast = _standardize_2d (_cmap_changer (
1882+ pcolorfast = _standardize_2d (_apply_cmap (
18861883 maxes .Axes .pcolorfast # WARNING: not available in cartopy and basemap
18871884 ))
1888- streamplot = _standardize_2d (_cmap_changer (
1885+ streamplot = _standardize_2d (_apply_cmap (
18891886 maxes .Axes .streamplot
18901887 ))
1891- quiver = _standardize_2d (_cmap_changer (
1888+ quiver = _standardize_2d (_apply_cmap (
18921889 maxes .Axes .quiver
18931890 ))
1894- barbs = _standardize_2d (_cmap_changer (
1891+ barbs = _standardize_2d (_apply_cmap (
18951892 maxes .Axes .barbs
18961893 ))
1897- imshow = _cmap_changer (
1894+ imshow = _apply_cmap (
18981895 maxes .Axes .imshow
18991896 )
19001897
19011898 # Wrapped only by cmap wrapper
1902- tripcolor = _cmap_changer (
1899+ tripcolor = _apply_cmap (
19031900 maxes .Axes .tripcolor
19041901 )
1905- tricontour = _cmap_changer (
1902+ tricontour = _apply_cmap (
19061903 maxes .Axes .tricontour
19071904 )
1908- tricontourf = _cmap_changer (
1905+ tricontourf = _apply_cmap (
19091906 maxes .Axes .tricontourf
19101907 )
1911- hist2d = _cmap_changer (
1908+ hist2d = _apply_cmap (
19121909 maxes .Axes .hist2d
19131910 )
1914- spy = _cmap_changer (
1911+ spy = _apply_cmap (
19151912 maxes .Axes .spy
19161913 )
1917- matshow = _cmap_changer (
1914+ matshow = _apply_cmap (
19181915 maxes .Axes .matshow
19191916 )
0 commit comments