Closed
Description
Bug report
Bug summary
The navigation toolbar at the bottom of a figure window contains a message box for displaying x and y coordinates. With the MacOSX backend, the available space appears to be fixed size and long text wraps and becomes unreadable even though the window width might be able to accommodate more text without wrapping.
Code for reproduction
from matplotlib import pyplot as plt
from math import pi, sin
N = 30
x = [n/N for n in range(5*N)]
y = [sin(i*pi) for i in x]
ax = plt.figure().add_subplot(1, 1, 1)
ax.format_coord = lambda x, y : 'the x-coordinate = ' + format(x, '1.4f') + ', ' + \
' and the y-coordinate = ' + format(y, '1.4f')
plt.plot(x, y)
plt.show()
Actual outcome
Expected outcome
I don't know if the behavior was different in earlier versions. I do know that the behavior is more "sensible" in the TkAgg backend. I haven't tested other backends. In TkAgg the available space expands as the window width expands.
Matplotlib version
- Operating system: Mac OS X 10.13.3 (High Sierra)
- Matplotlib version: 2.1.1
- Matplotlib backend (
print(matplotlib.get_backend())
): MacOSX - Python version: 3.6.4
- Jupyter version (if applicable): n/a
- Other libraries:
Installed Python from installer downloaded from python.org. Installed matplotlib with pip.