Zooming in on a part of a plot with a large range in y-values while using the linestyle "--" is very slow.
The following minimal working example hangs at the plt.show() line.
import numpy as np
import matplotlib.pyplot as plt
x = np.linspace(0,2)
y = [0.5]*25 + [1.5e13]*25
plt.plot(x, y, ls='--')
plt.ylim(0, 2)
plt.show()
The problem can also be experienced by commenting the plt.ylim() line, and then zooming in a few times with the mouse.
OS: OS X El Capitan 10.11.6
python: Python 3.5.1 (default, Mar 2 2016, 03:38:02) [GCC 4.2.1 Compatible Apple LLVM 7.0.2 (clang-700.1.81)] on darwin
matplotlib.version = 1.5.2
matplotlib.numpy_version = 1.6
python is from macports, matplotlib and numpy from pip install --user.