@@ -1433,7 +1433,10 @@ def plot_date(self, x, y, fmt='o', tz=None, xdate=True, ydate=False,
1433
1433
1434
1434
# @_preprocess_data() # let 'plot' do the unpacking..
1435
1435
@docstring .dedent_interpd
1436
- def loglog (self , * args , ** kwargs ):
1436
+ def loglog (self , * args ,
1437
+ basex = 10 , subsx = None , nonposx = 'mask' ,
1438
+ basey = 10 , subsy = None , nonposy = 'clip' ,
1439
+ ** kwargs ):
1437
1440
"""
1438
1441
Make a plot with log scaling on both the x and y axis.
1439
1442
@@ -1461,9 +1464,10 @@ def loglog(self, *args, **kwargs):
1461
1464
decades in the plot.
1462
1465
See `.Axes.set_xscale` / `.Axes.set_yscale` for details.
1463
1466
1464
- nonposx, nonposy : {'mask', 'clip'}, optional, default 'mask'
1467
+ nonposx, nonposy : {'mask', 'clip'}, optional
1465
1468
Non-positive values in x or y can be masked as invalid, or clipped
1466
1469
to a very small positive number.
1470
+ Default 'mask' for xaxis and 'clip' for yaxis.
1467
1471
1468
1472
Returns
1469
1473
-------
@@ -1475,20 +1479,13 @@ def loglog(self, *args, **kwargs):
1475
1479
**kwargs
1476
1480
All parameters supported by `.plot`.
1477
1481
"""
1478
- dx = {k : kwargs .pop (k ) for k in ['basex' , 'subsx' , 'nonposx' ]
1479
- if k in kwargs }
1480
- dy = {k : kwargs .pop (k ) for k in ['basey' , 'subsy' , 'nonposy' ]
1481
- if k in kwargs }
1482
-
1483
- self .set_xscale ('log' , ** dx )
1484
- self .set_yscale ('log' , ** dy )
1485
-
1486
- l = self .plot (* args , ** kwargs )
1487
- return l
1482
+ self .set_xscale ('log' , basex = basex , subsx = subsx , nonposx = nonposx )
1483
+ self .set_yscale ('log' , basey = basey , subsy = subsy , nonposy = nonposy )
1484
+ return self .plot (* args , ** kwargs )
1488
1485
1489
1486
# @_preprocess_data() # let 'plot' do the unpacking..
1490
1487
@docstring .dedent_interpd
1491
- def semilogx (self , * args , ** kwargs ):
1488
+ def semilogx (self , * args , basex = 10 , subsx = None , nonposx = 'mask' , ** kwargs ):
1492
1489
"""
1493
1490
Make a plot with log scaling on the x axis.
1494
1491
@@ -1528,16 +1525,12 @@ def semilogx(self, *args, **kwargs):
1528
1525
**kwargs
1529
1526
All parameters supported by `.plot`.
1530
1527
"""
1531
- d = {k : kwargs .pop (k ) for k in ['basex' , 'subsx' , 'nonposx' ]
1532
- if k in kwargs }
1533
-
1534
- self .set_xscale ('log' , ** d )
1535
- l = self .plot (* args , ** kwargs )
1536
- return l
1528
+ self .set_xscale ('log' , basex = basex , subsx = subsx , nonposx = nonposx )
1529
+ return self .plot (* args , ** kwargs )
1537
1530
1538
1531
# @_preprocess_data() # let 'plot' do the unpacking..
1539
1532
@docstring .dedent_interpd
1540
- def semilogy (self , * args , ** kwargs ):
1533
+ def semilogy (self , * args , basey = 10 , subsy = None , nonposy = 'clip' , ** kwargs ):
1541
1534
"""
1542
1535
Make a plot with log scaling on the y axis.
1543
1536
@@ -1563,7 +1556,7 @@ def semilogy(self, *args, **kwargs):
1563
1556
are automatically chosen depending on the number of decades in the
1564
1557
plot. See `.Axes.set_yscale` for details.
1565
1558
1566
- nonposy : {'mask', 'clip'}, optional, default 'mask '
1559
+ nonposy : {'mask', 'clip'}, optional, default 'clip '
1567
1560
Non-positive values in y can be masked as invalid, or clipped to a
1568
1561
very small positive number.
1569
1562
@@ -1577,12 +1570,8 @@ def semilogy(self, *args, **kwargs):
1577
1570
**kwargs
1578
1571
All parameters supported by `.plot`.
1579
1572
"""
1580
- d = {k : kwargs .pop (k ) for k in ['basey' , 'subsy' , 'nonposy' ]
1581
- if k in kwargs }
1582
- self .set_yscale ('log' , ** d )
1583
- l = self .plot (* args , ** kwargs )
1584
-
1585
- return l
1573
+ self .set_yscale ('log' , basey = basey , subsy = subsy , nonposy = nonposy )
1574
+ return self .plot (* args , ** kwargs )
1586
1575
1587
1576
@_preprocess_data (replace_names = ["x" ], label_namer = "x" )
1588
1577
def acorr (self , x , ** kwargs ):
0 commit comments