Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Embed matplotlib in qml application
Forum Updated to NodeBB v4.3 + New Features

Embed matplotlib in qml application

Scheduled Pinned Locked Moved Solved QML and Qt Quick
4 Posts 3 Posters 1.9k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    sinaniya
    wrote on 8 Mar 2021, 13:17 last edited by
    #1

    Hey everybody!

    so I made a qml application and want to show matplotlib output "in" the app; not in a new window. How can I achieve this?

    I'll be thankful.

    E 1 Reply Last reply 4 Jan 2024, 21:12
    0
    • A Offline
      A Offline
      Attila91
      wrote on 11 Mar 2021, 08:26 last edited by
      #2

      Hi,
      You can actually use matplotlib in your qml application using this :
      https://pypi.org/project/matplotlib-backend-qtquick/

      I 've had the same question some month ago and i 've successfully implemented this thanks to this library. All is well described in the documentation and on the first page.

      S 1 Reply Last reply 13 Mar 2021, 08:40
      2
      • A Attila91
        11 Mar 2021, 08:26

        Hi,
        You can actually use matplotlib in your qml application using this :
        https://pypi.org/project/matplotlib-backend-qtquick/

        I 've had the same question some month ago and i 've successfully implemented this thanks to this library. All is well described in the documentation and on the first page.

        S Offline
        S Offline
        sinaniya
        wrote on 13 Mar 2021, 08:40 last edited by
        #3

        @Attila91 I've found a work around which works for now. I used this python package: mpld3, which converts the matplotlib figure to HTML(D3 js library). Then I managed to show the result html file in the WebEngineView from QtWebEngine.

        But your solution looks more elegant and promising. I'll test it today. Thank you very much, mate!

        1 Reply Last reply
        0
        • S sinaniya
          8 Mar 2021, 13:17

          Hey everybody!

          so I made a qml application and want to show matplotlib output "in" the app; not in a new window. How can I achieve this?

          I'll be thankful.

          E Offline
          E Offline
          elfdnz
          wrote on 4 Jan 2024, 21:12 last edited by
          #4

          @sinaniya
          I want to show it in the application, how can I do it? Can you help me?

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved