File tree Expand file tree Collapse file tree 3 files changed +15
-7
lines changed
doc/api/next_api_changes/deprecations Expand file tree Collapse file tree 3 files changed +15
-7
lines changed Original file line number Diff line number Diff line change @@ -6,11 +6,11 @@ an accurate Matplotlib datenum relative to the new Matplotlib epoch
6
6
handling (`~.dates.get_epoch ` and :rc: `date.epoch `). This version
7
7
reverts the deprecation.
8
8
9
- `~.dates.epoch2num `, ` ~.dates. julian2num ` use :rc: `date.epoch `
10
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
9
+ Functions `~.dates.epoch2num ` and `` julian2num ` ` use :rc: `date.epoch `
10
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
11
11
12
- Now `~.dates.epoch2num ` and ` ~.dates. julian2num ` return floating point
12
+ Now `~.dates.epoch2num ` and (undocumented) `` julian2num ` ` return floating point
13
13
days since `~.dates.get_epoch ` as set by :rc: `date.epoch `, instead of
14
14
floating point days since the old epoch of "0000-12-31T00:00:00". If
15
15
needed, you can translate from the new to old values as
16
- `old = new + mdates.date2num(np.datetime64('0000-12-31')) `
16
+ `` old = new + mdates.date2num(np.datetime64('0000-12-31')) ` `
Original file line number Diff line number Diff line change @@ -197,7 +197,13 @@ def _get_rc_timezone():
197
197
Time-related constants.
198
198
"""
199
199
EPOCH_OFFSET = float (datetime .datetime (1970 , 1 , 1 ).toordinal ())
200
- JULIAN_OFFSET = 1721424.5 # Julian date at 0001-01-01
200
+ # EPOCH_OFFSET is not used by matplotlib
201
+ JULIAN_OFFSET = 1721424.5 # Julian date at 0000-12-31
202
+ # note that the Julian day epoch is achievable w/
203
+ # np.datetime64('-4713-11-24T12:00:00'); datetime64 is proleptic
204
+ # Gregorian and BC has a one-year offset. So
205
+ # np.datetime64('0000-12-31') - np.datetime64('-4713-11-24T12:00') = 1721424.5
206
+ # Ref: https://en.wikipedia.org/wiki/Julian_day
201
207
MICROSECONDLY = SECONDLY + 1
202
208
HOURS_PER_DAY = 24.
203
209
MIN_PER_HOUR = 60.
@@ -445,7 +451,8 @@ def julian2num(j):
445
451
Parameters
446
452
----------
447
453
j : float or sequence of floats
448
- Julian date(s) (days relative to 4713 BC Jan 1, 12:00:00)
454
+ Julian date(s) (days relative to 4713 BC Jan 1, 12:00:00 Julian
455
+ calendar or 4714 BC Nov 24, 12:00:00, proleptic Gregorian calendar)
449
456
450
457
Returns
451
458
-------
Original file line number Diff line number Diff line change 5
5
[libs]
6
6
# By default, Matplotlib builds with LTO, which may be slow if you re-compile
7
7
# often, and don't need the space saving/speedup.
8
- # enable_lto = True
8
+ enable_lto = False
9
9
# By default, Matplotlib downloads and builds its own copy of FreeType, and
10
10
# builds its own copy of Qhull. You may set the following to True to instead
11
11
# link against a system FreeType/Qhull.
18
18
# image files) are installed by default, but that can be changed here.
19
19
#tests = False
20
20
#sample_data = True
21
+ tests = True
21
22
22
23
[gui_support]
23
24
# Matplotlib supports multiple GUI toolkits, known as backends.
You can’t perform that action at this time.
0 commit comments