problems with Qt5 backend?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
DJP
Reply | Threaded
Open this post in threaded view
|

problems with Qt5 backend?

DJP
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')

ax.grid(True)

ax.set_xlabel('time')

ax.set_ylabel('volts')

canvas.print_figure('test.pdf')

canvas.show()



_______________________________________________
Matplotlib-users mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-users