SourceForge logo
SourceForge logo
Menu

matplotlib-checkins — Commit notification. DO NOT POST to this list, just subscribe to it.

You can subscribe to this list here.

2007 Jan
Feb
Mar
Apr
May
Jun
Jul
(115)
Aug
(120)
Sep
(137)
Oct
(170)
Nov
(461)
Dec
(263)
2008 Jan
(120)
Feb
(74)
Mar
(35)
Apr
(74)
May
(245)
Jun
(356)
Jul
(240)
Aug
(115)
Sep
(78)
Oct
(225)
Nov
(98)
Dec
(271)
2009 Jan
(132)
Feb
(84)
Mar
(74)
Apr
(56)
May
(90)
Jun
(79)
Jul
(83)
Aug
(296)
Sep
(214)
Oct
(76)
Nov
(82)
Dec
(66)
2010 Jan
(46)
Feb
(58)
Mar
(51)
Apr
(77)
May
(58)
Jun
(126)
Jul
(128)
Aug
(64)
Sep
(50)
Oct
(44)
Nov
(48)
Dec
(54)
2011 Jan
(68)
Feb
(52)
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
(1)
2018 Jan
Feb
Mar
Apr
May
(1)
Jun
Jul
Aug
Sep
Oct
Nov
Dec
S M T W T F S

1
(2)
2
(5)
3
(7)
4
(1)
5
(2)
6
7
8
(2)
9
(4)
10
(1)
11
12
(2)
13
(3)
14
15
(2)
16
(2)
17
18
19
(3)
20
(5)
21
(5)
22
(1)
23
(2)
24
(1)
25
(1)
26
27
28
29
30
31



Showing 2 results of 2

From: <ef...@us...> - 2010年03月08日 18:33:17
Revision: 8182
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8182&view=rev
Author: efiring
Date: 2010年03月08日 18:33:04 +0000 (2010年3月08日)
Log Message:
-----------
dates.py: fix num2jul, jul2num; fixes bug 2963391; thanks to G. Lichtenberg
Modified Paths:
--------------
 trunk/matplotlib/lib/matplotlib/dates.py
Modified: trunk/matplotlib/lib/matplotlib/dates.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/dates.py	2010年03月08日 18:09:55 UTC (rev 8181)
+++ trunk/matplotlib/lib/matplotlib/dates.py	2010年03月08日 18:33:04 UTC (rev 8182)
@@ -3,8 +3,9 @@
 Matplotlib provides sophisticated date plotting capabilities, standing
 on the shoulders of python :mod:`datetime`, the add-on modules
 :mod:`pytz` and :mod:`dateutils`. :class:`datetime` objects are
-converted to floating point numbers which represent the number of days
-since 0001年01月01日 UTC. The helper functions :func:`date2num`,
+converted to floating point numbers which represent time in days
+since 0001年01月01日 UTC, plus 1. For example, 0001年01月01日, 06:00 is
+1.25, not 0.25. The helper functions :func:`date2num`,
 :func:`num2date` and :func:`drange` are used to facilitate easy
 conversion to and from :mod:`datetime` and numeric ranges.
 
@@ -225,7 +226,7 @@
 *d* is either a :class:`datetime` instance or a sequence of datetimes.
 
 Return value is a floating point number (or sequence of floats)
- which gives number of days (fraction part represents hours,
+ which gives one plus the number of days (fraction part represents hours,
 minutes, seconds) since 0001年01月01日 00:00:00 UTC.
 """
 if not cbook.iterable(d): return _to_ordinalf(d)
@@ -235,17 +236,18 @@
 def julian2num(j):
 'Convert a Julian date (or sequence) to a matplotlib date (or sequence).'
 if cbook.iterable(j): j = np.asarray(j)
- return j + 1721425.5
+ return j - 1721424.5
 
 def num2julian(n):
 'Convert a matplotlib date (or sequence) to a Julian date (or sequence).'
 if cbook.iterable(n): n = np.asarray(n)
- return n - 1721425.5
+ return n + 1721424.5
 
 def num2date(x, tz=None):
 """
- *x* is a float value which gives number of days (fraction part
- represents hours, minutes, seconds) since 0001年01月01日 00:00:00 UTC.
+ *x* is a float value which gives one plus the number of days
+ (fraction part represents hours, minutes, seconds) since
+ 0001年01月01日 00:00:00 UTC.
 
 Return value is a :class:`datetime` instance in timezone *tz* (default to
 rcparams TZ value).
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <ef...@us...> - 2010年03月08日 18:10:02
Revision: 8181
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8181&view=rev
Author: efiring
Date: 2010年03月08日 18:09:55 +0000 (2010年3月08日)
Log Message:
-----------
dates.py: fix num2jul, jul2num; fixes bug 2963391; thanks to G. Lichtenberg
Modified Paths:
--------------
 branches/v0_99_maint/lib/matplotlib/dates.py
Modified: branches/v0_99_maint/lib/matplotlib/dates.py
===================================================================
--- branches/v0_99_maint/lib/matplotlib/dates.py	2010年03月05日 23:54:39 UTC (rev 8180)
+++ branches/v0_99_maint/lib/matplotlib/dates.py	2010年03月08日 18:09:55 UTC (rev 8181)
@@ -3,8 +3,9 @@
 Matplotlib provides sophisticated date plotting capabilities, standing
 on the shoulders of python :mod:`datetime`, the add-on modules
 :mod:`pytz` and :mod:`dateutils`. :class:`datetime` objects are
-converted to floating point numbers which represent the number of days
-since 0001年01月01日 UTC. The helper functions :func:`date2num`,
+converted to floating point numbers which represent time in days
+since 0001年01月01日 UTC, plus 1. For example, 0001年01月01日, 06:00 is
+1.25, not 0.25. The helper functions :func:`date2num`,
 :func:`num2date` and :func:`drange` are used to facilitate easy
 conversion to and from :mod:`datetime` and numeric ranges.
 
@@ -225,7 +226,7 @@
 *d* is either a :class:`datetime` instance or a sequence of datetimes.
 
 Return value is a floating point number (or sequence of floats)
- which gives number of days (fraction part represents hours,
+ which gives one plus the number of days (fraction part represents hours,
 minutes, seconds) since 0001年01月01日 00:00:00 UTC.
 """
 if not cbook.iterable(d): return _to_ordinalf(d)
@@ -235,17 +236,18 @@
 def julian2num(j):
 'Convert a Julian date (or sequence) to a matplotlib date (or sequence).'
 if cbook.iterable(j): j = np.asarray(j)
- return j + 1721425.5
+ return j - 1721424.5
 
 def num2julian(n):
 'Convert a matplotlib date (or sequence) to a Julian date (or sequence).'
 if cbook.iterable(n): n = np.asarray(n)
- return n - 1721425.5
+ return n + 1721424.5
 
 def num2date(x, tz=None):
 """
- *x* is a float value which gives number of days (fraction part
- represents hours, minutes, seconds) since 0001年01月01日 00:00:00 UTC.
+ *x* is a float value which gives one plus the number of days
+ (fraction part represents hours, minutes, seconds) since
+ 0001年01月01日 00:00:00 UTC.
 
 Return value is a :class:`datetime` instance in timezone *tz* (default to
 rcparams TZ value).
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.

Showing 2 results of 2

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /