O'Reilly logo

Matplotlib for Python Developers by Sandro Tosi

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Embedding Matplotlib in a GUI made with Qt Designer

For simple examples, designing the GUI in the Python code can be good enough, but for more complex applications, this solution does not scale.

There are some tools to help you design the GUI for Qt, and one of the most commonly used is Qt Designer.

Similar to Glade, we can design the user interface part of the application using on-screen form and drag-and-drop interface. Then we can connect the widgets with the backend code, where we develop the logic of the application.

The core of our example application will be plotting the frequencies of occurrences of letters in a text file: we will count the number of times each letter of the English alphabet appears in a given file and then plot this information ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required