@@ -1766,24 +1766,25 @@ def loglog(self, *args, **kwargs):
17661766 both the x-axis and the y-axis to log scaling. All of the concepts and
17671767 parameters of plot can be used here as well.
17681768
1769- The additional parameters *basex/y*, *subsx/y* and *nonposx/y* control
1770- the x/y-axis properties. They are just forwarded to `.Axes.set_xscale`
1771- and `.Axes.set_yscale`.
1769+ The additional parameters *base*, *subs* and *nonpositive* control the
1770+ x/y-axis properties. They are just forwarded to `.Axes.set_xscale` and
1771+ `.Axes.set_yscale`. To use different properties on the x-axis and the
1772+ y-axis, use e.g.
1773+ ``ax.set_xscale("log", base=10); ax.set_yscale("log", base=2)``.
17721774
17731775 Parameters
17741776 ----------
1775- basex, basey : float, default: 10
1776- Base of the x/y logarithm.
1777+ base : float, default: 10
1778+ Base of the logarithm.
17771779
1778- subsx, subsy : sequence, optional
1779- The location of the minor x/y ticks. If *None*, reasonable
1780- locations are automatically chosen depending on the number of
1781- decades in the plot.
1782- See `.Axes.set_xscale` / `.Axes.set_yscale` for details.
1780+ subs : sequence, optional
1781+ The location of the minor ticks. If *None*, reasonable locations
1782+ are automatically chosen depending on the number of decades in the
1783+ plot. See `.Axes.set_xscale`/`.Axes.set_yscale` for details.
17831784
1784- nonposx, nonposy : {'mask', 'clip'}, default: 'mask'
1785- Non-positive values in x or y can be masked as invalid, or clipped
1786- to a very small positive number.
1785+ nonpositive : {'mask', 'clip'}, default: 'mask'
1786+ Non-positive values can be masked as invalid, or clipped to a very
1787+ small positive number.
17871788
17881789 Returns
17891790 -------
@@ -1795,16 +1796,16 @@ def loglog(self, *args, **kwargs):
17951796 **kwargs
17961797 All parameters supported by `.plot`.
17971798 """
1798- dx = {k : kwargs .pop (k ) for k in ['basex' , 'subsx' , 'nonposx' ]
1799- if k in kwargs }
1800- dy = {k : kwargs .pop (k ) for k in ['basey' , 'subsy' , 'nonposy' ]
1801- if k in kwargs }
1802-
1799+ dx = {k : v for k , v in kwargs .items ()
1800+ if k in ['base' , 'subs' , 'nonpositive' ,
1801+ 'basex' , 'subsx' , 'nonposx' ]}
18031802 self .set_xscale ('log' , ** dx )
1803+ dy = {k : v for k , v in kwargs .items ()
1804+ if k in ['base' , 'subs' , 'nonpositive' ,
1805+ 'basey' , 'subsy' , 'nonposy' ]}
18041806 self .set_yscale ('log' , ** dy )
1805-
1806- l = self .plot (* args , ** kwargs )
1807- return l
1807+ return self .plot (
1808+ * args , ** {k : v for k , v in kwargs .items () if k not in {* dx , * dy }})
18081809
18091810 # @_preprocess_data() # let 'plot' do the unpacking..
18101811 @docstring .dedent_interpd
@@ -1821,20 +1822,20 @@ def semilogx(self, *args, **kwargs):
18211822 the x-axis to log scaling. All of the concepts and parameters of plot
18221823 can be used here as well.
18231824
1824- The additional parameters *basex *, *subsx* and *nonposx * control the
1825+ The additional parameters *base *, *subs*, and *nonpositive * control the
18251826 x-axis properties. They are just forwarded to `.Axes.set_xscale`.
18261827
18271828 Parameters
18281829 ----------
1829- basex : float, default: 10
1830+ base : float, default: 10
18301831 Base of the x logarithm.
18311832
1832- subsx : array-like, optional
1833+ subs : array-like, optional
18331834 The location of the minor xticks. If *None*, reasonable locations
18341835 are automatically chosen depending on the number of decades in the
18351836 plot. See `.Axes.set_xscale` for details.
18361837
1837- nonposx : {'mask', 'clip'}, default: 'mask'
1838+ nonpositive : {'mask', 'clip'}, default: 'mask'
18381839 Non-positive values in x can be masked as invalid, or clipped to a
18391840 very small positive number.
18401841
@@ -1848,12 +1849,12 @@ def semilogx(self, *args, **kwargs):
18481849 **kwargs
18491850 All parameters supported by `.plot`.
18501851 """
1851- d = {k : kwargs . pop ( k ) for k in [ 'basex' , 'subsx' , 'nonposx' ]
1852- if k in kwargs }
1853-
1852+ d = {k : v for k , v in kwargs . items ()
1853+ if k in [ 'base' , 'subs' , 'nonpositive' ,
1854+ 'basex' , 'subsx' , 'nonposx' ]}
18541855 self .set_xscale ('log' , ** d )
1855- l = self .plot (* args , ** kwargs )
1856- return l
1856+ return self .plot (
1857+ * args , ** { k : v for k , v in kwargs . items () if k not in d })
18571858
18581859 # @_preprocess_data() # let 'plot' do the unpacking..
18591860 @docstring .dedent_interpd
@@ -1870,20 +1871,20 @@ def semilogy(self, *args, **kwargs):
18701871 the y-axis to log scaling. All of the concepts and parameters of plot
18711872 can be used here as well.
18721873
1873- The additional parameters *basey *, *subsy* and *nonposy * control the
1874+ The additional parameters *base *, *subs*, and *nonpositive * control the
18741875 y-axis properties. They are just forwarded to `.Axes.set_yscale`.
18751876
18761877 Parameters
18771878 ----------
1878- basey : float, default: 10
1879+ base : float, default: 10
18791880 Base of the y logarithm.
18801881
1881- subsy : array-like, optional
1882+ subs : array-like, optional
18821883 The location of the minor yticks. If *None*, reasonable locations
18831884 are automatically chosen depending on the number of decades in the
18841885 plot. See `.Axes.set_yscale` for details.
18851886
1886- nonposy : {'mask', 'clip'}, default: 'mask'
1887+ nonpositive : {'mask', 'clip'}, default: 'mask'
18871888 Non-positive values in y can be masked as invalid, or clipped to a
18881889 very small positive number.
18891890
@@ -1897,12 +1898,12 @@ def semilogy(self, *args, **kwargs):
18971898 **kwargs
18981899 All parameters supported by `.plot`.
18991900 """
1900- d = {k : kwargs .pop (k ) for k in ['basey' , 'subsy' , 'nonposy' ]
1901- if k in kwargs }
1901+ d = {k : v for k , v in kwargs .items ()
1902+ if k in ['base' , 'subs' , 'nonpositive' ,
1903+ 'basey' , 'subsy' , 'nonposy' ]}
19021904 self .set_yscale ('log' , ** d )
1903- l = self .plot (* args , ** kwargs )
1904-
1905- return l
1905+ return self .plot (
1906+ * args , ** {k : v for k , v in kwargs .items () if k not in d })
19061907
19071908 @_preprocess_data (replace_names = ["x" ], label_namer = "x" )
19081909 def acorr (self , x , ** kwargs ):
@@ -2343,11 +2344,11 @@ def bar(self, x, height, width=0.8, bottom=None, *, align="center",
23432344 if orientation == 'vertical' :
23442345 self ._process_unit_info (xdata = x , ydata = height , kwargs = kwargs )
23452346 if log :
2346- self .set_yscale ('log' , nonposy = 'clip' )
2347+ self .set_yscale ('log' , nonpositive = 'clip' )
23472348 elif orientation == 'horizontal' :
23482349 self ._process_unit_info (xdata = width , ydata = y , kwargs = kwargs )
23492350 if log :
2350- self .set_xscale ('log' , nonposx = 'clip' )
2351+ self .set_xscale ('log' , nonpositive = 'clip' )
23512352
23522353 # lets do some conversions now since some types cannot be
23532354 # subtracted uniformly
@@ -6792,9 +6793,9 @@ def hist(self, x, bins=None, range=None, density=False, weights=None,
67926793
67936794 if log :
67946795 if orientation == 'horizontal' :
6795- self .set_xscale ('log' , nonposx = 'clip' )
6796+ self .set_xscale ('log' , nonpositive = 'clip' )
67966797 else : # orientation == 'vertical'
6797- self .set_yscale ('log' , nonposy = 'clip' )
6798+ self .set_yscale ('log' , nonpositive = 'clip' )
67986799
67996800 if align == 'left' :
68006801 x -= 0.5 * (bins [1 ]- bins [0 ])
0 commit comments