Results 1 to 3 of 3

Thread: PyQt5 chart

  1. #1
    Join Date
    Apr 2015
    Posts
    28
    Thanks
    4
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default PyQt5 chart

    I would like a pretty simple bar chart in a PyQt application I'm making. I've been looking around a bit on how to create such charts, there seems to be a few solutions but none of them seems to me like a fairly simple and straight forward option. It does not have to be interactive. Any suggestions in which direction to go? This is what I've found:

    • Matplotlib. Not a native part of python, needs to be installed manually fot Qt5 support. I want to keep the code as easily manageable as possible (all GUI in QtDesigner, not in code, if possible) and I'm a bit afraid matplotlib will force me to do a bit of GUI coding manually. Also I want the application to be easily movable to other platforms (I'd prefer a big fat all-in-one exe file for windows, without "you need to install this and that first"-solution).
    • QtCharts. Does not seem to be natively supported by PyQt. Otherwise it looks really easy to use.
    • SVG.
    • Manual painting with QPaint. Feels a bit unnecessarily low-level.


    Do you guys know any more options? Since I'm new on this it sure helps if good documentation exists.

  2. #2
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    4,487
    Thanks
    252
    Thanked 714 Times in 704 Posts
    Qt products
    Qt5
    Platforms
    Windows Android

    Default Re: PyQt5 chart

    Matplotlib does seem to have a Python interface through pyplot. I don't know where the plots are hosted though - whether in your own window or one of matplotlib's.

    After more searching, here's an example of matplotlib embedded in a Qt5 widget.
    Last edited by d_stranz; 23rd April 2016 at 23:59.

  3. #3
    Join Date
    Apr 2015
    Posts
    28
    Thanks
    4
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: PyQt5 chart

    Quote Originally Posted by d_stranz View Post
    Matplotlib does seem to have a Python interface through pyplot. I don't know where the plots are hosted though - whether in your own window or one of matplotlib's.

    After more searching, here's an example of matplotlib embedded in a Qt5 widget.
    I've looked a bit at that, there's also a nice gallery with code examples on their web site. I drawback is that you cannot simply apt-get install it, you need a newer version, meaning manual install, and that pretty much always means a lot more work than anyone will admit since Linux environments can be set up in so may ways. But I'll give it a try, cant find any better option right now.

Similar Threads

  1. Replies: 0
    Last Post: 5th August 2012, 01:03
  2. [PyQt4] PyQt4 + gcin issue
    By fieliapm in forum Installation and Deployment
    Replies: 0
    Last Post: 28th September 2010, 08:04
  3. how much about kd chart
    By yunpeng880 in forum Qt Programming
    Replies: 1
    Last Post: 12th March 2009, 09:54
  4. what chart for qt?
    By yunpeng880 in forum Qt Programming
    Replies: 1
    Last Post: 8th January 2009, 11:07

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.