{"action":"created","issue":{"url":"https://api.github.com/repos/matplotlib/matplotlib/issues/10533","repository_url":"https://api.github.com/repos/matplotlib/matplotlib","labels_url":"https://api.github.com/repos/matplotlib/matplotlib/issues/10533/labels{/name}","comments_url":"https://api.github.com/repos/matplotlib/matplotlib/issues/10533/comments","events_url":"https://api.github.com/repos/matplotlib/matplotlib/issues/10533/events","html_url":"https://github.com/matplotlib/matplotlib/issues/10533","id":298353527,"number":10533,"title":"Recognize pandas Timestamp objects for DateConverter?","user":{"login":"jorisvandenbossche","id":1020496,"avatar_url":"https://avatars2.githubusercontent.com/u/1020496?v=4","gravatar_id":"","url":"https://api.github.com/users/jorisvandenbossche","html_url":"https://github.com/jorisvandenbossche","followers_url":"https://api.github.com/users/jorisvandenbossche/followers","following_url":"https://api.github.com/users/jorisvandenbossche/following{/other_user}","gists_url":"https://api.github.com/users/jorisvandenbossche/gists{/gist_id}","starred_url":"https://api.github.com/users/jorisvandenbossche/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jorisvandenbossche/subscriptions","organizations_url":"https://api.github.com/users/jorisvandenbossche/orgs","repos_url":"https://api.github.com/users/jorisvandenbossche/repos","events_url":"https://api.github.com/users/jorisvandenbossche/events{/privacy}","received_events_url":"https://api.github.com/users/jorisvandenbossche/received_events","type":"User","site_admin":false},"labels":[{"id":151682677,"url":"https://api.github.com/repos/matplotlib/matplotlib/labels/third-party%20integration","name":"third-party integration","color":"c7def8","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/matplotlib/matplotlib/milestones/31","html_url":"https://github.com/matplotlib/matplotlib/milestone/31","labels_url":"https://api.github.com/repos/matplotlib/matplotlib/milestones/31/labels","id":3106571,"number":31,"title":"v2.2.0","description":"Release of v2.2.0 final release.\r\n\r\non-merge: backport to v2.2.x","creator":{"login":"tacaswell","id":199813,"avatar_url":"https://avatars3.githubusercontent.com/u/199813?v=4","gravatar_id":"","url":"https://api.github.com/users/tacaswell","html_url":"https://github.com/tacaswell","followers_url":"https://api.github.com/users/tacaswell/followers","following_url":"https://api.github.com/users/tacaswell/following{/other_user}","gists_url":"https://api.github.com/users/tacaswell/gists{/gist_id}","starred_url":"https://api.github.com/users/tacaswell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tacaswell/subscriptions","organizations_url":"https://api.github.com/users/tacaswell/orgs","repos_url":"https://api.github.com/users/tacaswell/repos","events_url":"https://api.github.com/users/tacaswell/events{/privacy}","received_events_url":"https://api.github.com/users/tacaswell/received_events","type":"User","site_admin":false},"open_issues":13,"closed_issues":486,"state":"open","created_at":"2018-02-12T03:21:01Z","updated_at":"2018-02-19T17:36:05Z","due_on":"2018-03-02T08:00:00Z","closed_at":null},"comments":1,"created_at":"2018-02-19T17:30:18Z","updated_at":"2018-02-19T17:41:47Z","closed_at":null,"author_association":"NONE","body":"I am testing matplotlib 2.2rc from a point of view of \"what if pandas no longer registers its unit converters\", and one of the issues raised when we temporarily did that for the 0.21.0 release was the following (https://github.com/pandas-dev/pandas/issues/18283):\r\n\r\n**Code for reproduction**\r\n\r\n```python\r\nimport pandas as pd\r\nimport matplotlib.pyplot as plt\r\n\r\npd.plotting.deregister_matplotlib_converters()\r\n\r\nxticks = pd.date_range(start=\"10/10/2017\", end=\"11/11/2017\",\r\n                       freq='D')\r\nplt.xticks(xticks, xticks.strftime(\"%a %m-%d\"))\r\n```\r\n\r\n**Actual outcome**\r\n\r\nThe above raises `TypeError: Cannot compare type 'Timestamp' with type 'float'`, because Timestamps are not recognized to use the `DateConverter` in the units framework.\r\n\r\nWould it be possible to consider adding pandas Timestamps to the unit registry? It are subclasses of `datetime.datetime`, so code-wise it should not be hard to add support.\r\n\r\n**Matplotlib version**\r\n<!--Please specify your platform and versions of the relevant libraries you are using:-->\r\n  * Operating system: Linux\r\n  * Matplotlib version: '2.2.0rc1'\r\n  * Python version: 3.5"},"comment":{"url":"https://api.github.com/repos/matplotlib/matplotlib/issues/comments/366761816","html_url":"https://github.com/matplotlib/matplotlib/issues/10533#issuecomment-366761816","issue_url":"https://api.github.com/repos/matplotlib/matplotlib/issues/10533","id":366761816,"user":{"login":"jorisvandenbossche","id":1020496,"avatar_url":"https://avatars2.githubusercontent.com/u/1020496?v=4","gravatar_id":"","url":"https://api.github.com/users/jorisvandenbossche","html_url":"https://github.com/jorisvandenbossche","followers_url":"https://api.github.com/users/jorisvandenbossche/followers","following_url":"https://api.github.com/users/jorisvandenbossche/following{/other_user}","gists_url":"https://api.github.com/users/jorisvandenbossche/gists{/gist_id}","starred_url":"https://api.github.com/users/jorisvandenbossche/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jorisvandenbossche/subscriptions","organizations_url":"https://api.github.com/users/jorisvandenbossche/orgs","repos_url":"https://api.github.com/users/jorisvandenbossche/repos","events_url":"https://api.github.com/users/jorisvandenbossche/events{/privacy}","received_events_url":"https://api.github.com/users/jorisvandenbossche/received_events","type":"User","site_admin":false},"created_at":"2018-02-19T17:41:47Z","updated_at":"2018-02-19T17:41:47Z","author_association":"NONE","body":"Hmm, yes, I didn't think of that problem ..\r\n\r\n> I think that would let both be lazy and not import the other and get around import-order issues.\r\n\r\nYes, if we both tried to register it lazily, that sounds like a possible solution. \r\n(we only need to register something different as `pd.plotting.register_matplotlib_converters()`, because that one is registering our *own, custom* converters, while in this case we want to register matplotlib's DateConverter)"}}
{"actor":{"display_login":"jorisvandenbossche"}}