@@ -311,14 +311,18 @@ def date2num(d):
311
311
312
312
313
313
def julian2num (j ):
314
- 'Convert a Julian date (or sequence) to a matplotlib date (or sequence).'
314
+ """
315
+ Convert a Julian date (or sequence) to a matplotlib date (or sequence).
316
+ """
315
317
if cbook .iterable (j ):
316
318
j = np .asarray (j )
317
319
return j - 1721424.5
318
320
319
321
320
322
def num2julian (n ):
321
- 'Convert a matplotlib date (or sequence) to a Julian date (or sequence).'
323
+ """
324
+ Convert a matplotlib date (or sequence) to a Julian date (or sequence).
325
+ """
322
326
if cbook .iterable (n ):
323
327
n = np .asarray (n )
324
328
return n + 1721424.5
@@ -1207,7 +1211,9 @@ def _get_interval(self):
1207
1211
1208
1212
1209
1213
def _close_to_dt (d1 , d2 , epsilon = 5 ):
1210
- 'Assert that datetimes *d1* and *d2* are within *epsilon* microseconds.'
1214
+ """
1215
+ Assert that datetimes *d1* and *d2* are within *epsilon* microseconds.
1216
+ """
1211
1217
delta = d2 - d1
1212
1218
mus = abs (delta .days * MUSECONDS_PER_DAY + delta .seconds * 1e6 +
1213
1219
delta .microseconds )
@@ -1300,22 +1306,30 @@ def date_ticker_factory(span, tz=None, numticks=5):
1300
1306
1301
1307
1302
1308
def seconds (s ):
1303
- 'Return seconds as days.'
1309
+ """
1310
+ Return seconds as days.
1311
+ """
1304
1312
return float (s ) / SEC_PER_DAY
1305
1313
1306
1314
1307
1315
def minutes (m ):
1308
- 'Return minutes as days.'
1316
+ """
1317
+ Return minutes as days.
1318
+ """
1309
1319
return float (m ) / MINUTES_PER_DAY
1310
1320
1311
1321
1312
1322
def hours (h ):
1313
- 'Return hours as days.'
1323
+ """
1324
+ Return hours as days.
1325
+ """
1314
1326
return h / 24.
1315
1327
1316
1328
1317
1329
def weeks (w ):
1318
- 'Return weeks as days.'
1330
+ """
1331
+ Return weeks as days.
1332
+ """
1319
1333
return w * 7.
1320
1334
1321
1335
@@ -1360,7 +1374,9 @@ def convert(value, unit, axis):
1360
1374
1361
1375
@staticmethod
1362
1376
def default_units (x , axis ):
1363
- 'Return the tzinfo instance of *x* or of its first element, or None'
1377
+ """
1378
+ Return the tzinfo instance of *x* or of its first element, or None
1379
+ """
1364
1380
if isinstance (x , np .ndarray ):
1365
1381
x = x .ravel ()
1366
1382
0 commit comments