Closed
Description
Bug report
Bug summary
The interactive plot window is too small, but the text remains at the size that would be correct for a larger properly sized window.
It works if you go through pyplot:
fig, ax = plt.subplots(figsize=(6,4))
ax.plot([1,2,3])
but not in this example, which uses the pure OO interface.
The version of the plot saved to the file text.pdf is correctly sized.
Code for reproduction
from matplotlib.backends.backend_qt5agg \
import FigureCanvasQTAgg as FigureCanvas
from matplotlib.figure import Figure
fig = Figure(figsize=(6, 4))
canvas = FigureCanvas(fig)
ax = fig.add_subplot(111)
ax.plot([1, 2, 3, 2, 3, 4, 3, 4, 5])
ax.set_title('A simple plot')
ax.grid(True)
ax.set_xlabel('time')
ax.set_ylabel('volts')
canvas.print_figure('test.pdf')
canvas.show()
Actual outcome
Expected outcome
Matplotlib version
- Operating System: MacOS Sierra 10.12.5
- Matplotlib Version: 2.0.2
- Python Version: 3.6.1
- Jupyter Version (if applicable):
- Other Libraries:
Installed with conda (default)