Issue 1:
Reported also in mwaskom/seaborn#282

Environment: OS X Mavericks

Anaconda python distribution (python 2.7.8)

IPython 2.2.0

Seaborn 0.4

In an ipython terminal or qtconsole, it works with running

n [1]: %matplotlib
Using matplotlib backend: MacOSX

In [2]: from pylab import *

In [3]: plot(range(5))
Out[3]: [<matplotlib.lines.Line2D at 0x10d73dd50>]

However, after importing seaborn, the macosx backend breaks

In [4]: import seaborn as sns

In [5]: plot(range(5))
Out[5]: [<matplotlib.lines.Line2D at 0x10c10eb90>]

In [6]: Traceback (most recent call last):
File "/Users/zhangxiaowei/anaconda/lib/python2.7/site-packages/matplotlib/artist.py", line 59, in draw_wrapper
draw(artist, renderer, *args, **kwargs)
File "/Users/zhangxiaowei/anaconda/lib/python2.7/site-packages/matplotlib/figure.py", line 1079, in draw
func(*args)
File "/Users/zhangxiaowei/anaconda/lib/python2.7/site-packages/matplotlib/artist.py", line 59, in draw_wrapper
draw(artist, renderer, *args, **kwargs)
File "/Users/zhangxiaowei/anaconda/lib/python2.7/site-packages/matplotlib/axes/_base.py", line 2092, in draw
a.draw(renderer)
File "/Users/zhangxiaowei/anaconda/lib/python2.7/site-packages/matplotlib/artist.py", line 59, in draw_wrapper
draw(artist, renderer, *args, **kwargs)
File "/Users/zhangxiaowei/anaconda/lib/python2.7/site-packages/matplotlib/axis.py", line 1105, in draw
renderer)
File "/Users/zhangxiaowei/anaconda/lib/python2.7/site-packages/matplotlib/axis.py", line 1054, in _get_tick_bboxes
extent = tick.label1.get_window_extent(renderer)
File "/Users/zhangxiaowei/anaconda/lib/python2.7/site-packages/matplotlib/text.py", line 741, in get_window_extent
bbox, info, descent = self._get_layout(self._renderer)
File "/Users/zhangxiaowei/anaconda/lib/python2.7/site-packages/matplotlib/text.py", line 311, in _get_layout
ismath=False)
File "/Users/zhangxiaowei/anaconda/lib/python2.7/site-packages/matplotlib/backends/backend_macosx.py", line 166, in get_text_width_height_descent
six.text_type(s), family, size, weight, style)
TypeError: bad argument type for built-in operation

Interestingly, using %matplotlib inline in an IPython notebook works fine. Also, using another backend such as "Qt4Agg" works fine in IPython terminal or qtconsole.

After downgrading matplotlib to 1.3.1, the issue goes away.

Issue 2:
Bug report

Bug summary

axes3D.zaxis.set_major_formatter(mpl.dates.DateFormatter("%Y/%m")) couldn't show datetime axis correctly. It report ValueError: year is out of range.

Code for reproduction

import matplotlib as mpl
from mpl_toolkits.mplot3d import Axes3D
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
from datetime import datetime
import time

mpl.rcParams['legend.fontsize'] = 10

fig = plt.figure()
ax = fig.gca(projection='3d')

SJ = pd.to_datetime(['2017/1/1 0:03:36','2017/1/1 0:33:36','2017/1/1 1:03:36'])

for i in np.arange(0, 3, 1):
x=[ii for ii in np.arange(0,20,1)]
y=[np.sin(ii) for ii in np.arange(0,20,1)]
z= SJ[i].timestamp()
print(str(z)+':'+str(datetime.fromtimestamp(z)))
# print(datetime.fromordinal(int(z/60/24)))
ax.plot(x, y, z)

ax.zaxis.set_major_formatter(mpl.dates.DateFormatter("%Y/%m/%d/%H"))
plt.show()

Actual outcome

1483200216.0:2017-01-01 00:03:36
1483202016.0:2017-01-01 00:33:36
1483203816.0:2017-01-01 01:03:36
Exception in Tkinter callback
Traceback (most recent call last):
File "C:\Program Files\Anaconda3\lib\tkinter\__init__.py", line 1550, in __call__
return self.func(*args)
File "C:\Program Files\Anaconda3\lib\site-packages\matplotlib\backends\backend_tkagg.py", line 280, in resize
self.show()
File "C:\Program Files\Anaconda3\lib\site-packages\matplotlib\backends\backend_tkagg.py", line 351, in draw
FigureCanvasAgg.draw(self)
File "C:\Program Files\Anaconda3\lib\site-packages\matplotlib\backends\backend_agg.py", line 464, in draw
self.figure.draw(self.renderer)
File "C:\Program Files\Anaconda3\lib\site-packages\matplotlib\artist.py", line 63, in draw_wrapper
draw(artist, renderer, *args, **kwargs)
File "C:\Program Files\Anaconda3\lib\site-packages\matplotlib\figure.py", line 1144, in draw
renderer, self, dsu, self.suppressComposite)
File "C:\Program Files\Anaconda3\lib\site-packages\matplotlib\image.py", line 139, in _draw_list_compositing_images
a.draw(renderer)
File "C:\Program Files\Anaconda3\lib\site-packages\mpl_toolkits\mplot3d\axes3d.py", line 290, in draw
ax.draw(renderer)
File "C:\Program Files\Anaconda3\lib\site-packages\mpl_toolkits\mplot3d\axis3d.py", line 258, in draw
for i, val in enumerate(majorLocs)]
File "C:\Program Files\Anaconda3\lib\site-packages\mpl_toolkits\mplot3d\axis3d.py", line 258, in <listcomp>
for i, val in enumerate(majorLocs)]
File "C:\Program Files\Anaconda3\lib\site-packages\matplotlib\dates.py", line 466, in __call__
dt = num2date(x, self.tz)
File "C:\Program Files\Anaconda3\lib\site-packages\matplotlib\dates.py", line 401, in num2date
return _from_ordinalf(x, tz)
File "C:\Program Files\Anaconda3\lib\site-packages\matplotlib\dates.py", line 254, in _from_ordinalf
dt = datetime.datetime.fromordinal(ix).replace(tzinfo=UTC)
ValueError: year is out of range
[Finished in 4.8s]

Expected outcome

Matplotlib version

Operating System: windows 7 x64

Matplotlib Version: 2.02

Python Version:python 3.5.2 |Anaconda 4.2.0 （64bit）| [MCS v.1900 64 bit ] on win32

Jupyter Version (if applicable):

Other Libraries: