The following script runs fine with pyqt version 4 but not version 5. With Qt5 the interactive plot window is too small, but the text remains at the size that would be correct for a larger properly sized window. I'm running Qt5 with the latest Anaconda installation on a Mac. Is this a problem with the matplotlib backend for Qt5? By the way, the version of the plot saved to the file text.pdf is correctly sized.