[Matplotlib-users] problems with Qt5 backend?
David J Pine
djpine at gmail.com
Sun Jun 4 08:25:31 EDT 2017
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.
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')
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Matplotlib-users