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 Update on Monday, May 27th 2025

Embed matplotlib in qml application

Scheduled Pinned Locked Moved Solved QML and Qt Quick
4 Posts 3 Posters 1.8k Views
  • 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 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
    0
    • A Offline
      A Offline
      Attila91
      wrote on 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
      2
      • A Attila91

        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 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

          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 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