Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error in matplotlib.pyplot.plot_date doku? #1363

Closed
nasenbaer opened this issue Oct 10, 2012 · 2 comments
Closed

error in matplotlib.pyplot.plot_date doku? #1363

nasenbaer opened this issue Oct 10, 2012 · 2 comments
Labels
status: needs clarification Issues that need more information to resolve.

Comments

@nasenbaer
Copy link

Hi,
here http://matplotlib.org/api/pyplot_api.html?highlight=plot_date#matplotlib.pyplot.plot_date
shouldn't this line:
x and/or y can be a sequence of dates represented as float days since 0001-01-01 UTC

rather be
x and/or y can be a sequence of dates represented as float days since 2001-01-01 UTC

so the year 0001 should be 2001, right? at least with my version 2001-01-01 works...

@efiring
Copy link
Member

efiring commented Oct 11, 2012

On 2012/10/10 1:44 PM, nasenbaer wrote:

Hi,
here
http://matplotlib.org/api/pyplot_api.html?highlight=plot_date#matplotlib.pyplot.plot_date
shouldn't this line:
x and/or y can be a sequence of dates represented as float days since
0001-01-01 UTC

rather be
x and/or y can be a sequence of dates represented as float days since
2001-01-01 UTC

No, it is almost correct. It should say that it interprets float days
as 1 day plus the interval in days since 0001-01-01 using the Gregorian
calendar. See the documentation for the dates module and the date2num
and num2date functions.

so the year 0001 should be 2001, right? at least with my version
2001-01-01 works...

What do you mean here by "works"?

If you want to use 2001-01-01 as your origin for a floating point days
time scale, then you need to add date2num(datetime.date(2001, 1, 1)) to
it before feeding it to plot_date.

Eric


Reply to this email directly or view it on GitHub
#1363.

@tacaswell
Copy link
Member

Closing this due to lack of response from OP. @nasenbaer Please re-open this if you want.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: needs clarification Issues that need more information to resolve.
Projects
None yet
Development

No branches or pull requests

3 participants