Giter VIP home page Giter VIP logo

matplotlib_qtquick_playground's Introduction

โš ๏ธ This project is archived as no longer maintained

matplotlib_qtquick_playground

Port of the example kindly provided by Eli Bendersky to PyQt5: https://github.com/eliben/code-for-blog/tree/master/2009/pyqt_dataplot_demo

Derivation of the example have been made based on the three following Qt technologies:

  • QtWidgets
  • QtQuick Controls 1.0
  • QtQuick Controls 2.0 (actually Qt.labs.controls 1.0 as I used PyQt 5.6)

The goal of this work was to play around with QtQuick and PyQt5. The integration of matplotlib with QtWidgets is the best as a backend support full interactivity and navigation toolbar. A new matplotlib backend based on a QQuickItem has been created to restore maximal interactivity.

The logic behind QtWidgets GUI and QtQuick is quite different. For example, in the former, the Python script takes care of reading all widgets before updating the figure. But in the latter, QtQuick controls are binded to Python properties that emit signal forcing the figure to update.

QtWidgets version

QtWidgets version

QtQuick Controls 1.0 version

QtQuick Controls 1.0 version

QtQuick Controls 2.0 version

QtQuick Controls 2.0 version

Code functions

Series of data are loaded from a .csv file, and their names are displayed in a checkable list view. The user can select the series it wants from the list and plot them on a matplotlib canvas. Use the sample .csv file that comes with the scripts for an example of data series.

Requirements

  • Python >= 3.5
  • PyQt = 5.6 (if you plan to use PyQt 5.7, references have changed as QtQuick.Controls 2.0 have integrated the official library)
  • matplolib >= 1.4

License

MIT License

Copyright (C) 2016 Frederic Collonval

The code for QtQuick Controls 2.0 makes used of the KDE Breeze Icons Theme (https://github.com/KDE/breeze-icons) distributed under LGPLv3

The Breeze Icon Theme in icons/

Copyright (C) 2014 Uri Herrera and others

matplotlib_qtquick_playground's People

Contributors

fcollonval avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

matplotlib_qtquick_playground's Issues

Updating qtquick_controls_v2

Hello,
I try to get this code to work with current matplotlib and pyqt5 versions and created a fork to be found at
https://github.com/SietseAchterop/matplotlib_qtquick_playground
After a number of trivial fixes there are a few issues in the backend.

There is a nonexistent function tostring_bgra. I added it, ad hoc, to matlibplot.backends/backend_agg.py and it now basically works.
See the readme.md and the (small) patches for more details.

It would be great to get the code updated. Hints on how to proceed would be very welcome.
Thanks in advance, Sietse

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.