Using dates in a simple plot with wxPython doesn't work

I try to use a dates on the x-aches. With pure Python3 code it works
fine. BUt when I try to use this inside wxPython application on a
FigureCanvas it doesn't work. And I don't understand the difference
here.

This is the error
[err]
     plot.plot([datetime.date(2015, 1, 7),
TypeError: descriptor 'date' requires a 'datetime.datetime' object but
received a 'int'
[/err]

This is the fine working pure Python3 code.

<snip>

import datetime

<snip>

This is the piece of wxPython code that cause the error

<snip>

from datetime import datetime

  There is the problem. The error has nothing to do with matplotlib. In one case you did "import datetime" and imported the datetime library. In the other you did "from datetime import datetime", thus importing the datetime type from that library. If your first version is working, change the second version to use the same import.

···

On 2015-07-28 10:31, (by way of c.buhtz@...4689...) wrote:

--
Brendan Barnwell
"Do not follow where the path may lead. Go, instead, where there is no path, and leave a trail."
    --author unknown