Home > kivy, matplotlib > Matplotlib backend kivy in Windows hands on

Matplotlib backend kivy in Windows hands on

The backend implementations for matplotlib in kivy work just with kivy versions greater or equal than 1.9.1. It is required to install kivy in development mode following these steps: http://kivy.org/docs/installation/installation-windows.html#use-development-kivy. After step 10 you can additionally run

python setup.py install

The script kivy.bat creates an environment in which some python tools are ready to use, for instance pip. The next step is to download numpy and matplotlib from this binaries repositories: http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy and http://www.lfd.uci.edu/~gohlke/pythonlibs/#matplotlib. Once downloaded install both using pip and then install kivy-garden and the matplotlib package for kivy.

pip install "numpy-1.10.0b1+mkl-cp27-none-win32.whl"
pip install "matplotlib-1.4.3-cp27-none-win32.whl"
pip install kivy-garden
garden install matplotlib

You can go now to the folder that by default garden packages are installed. In my case C:\Users\my_user\.kivy\garden\

cd garden.matplotlib/examples
python test_plt.py

And you should be able to see the matplotlib widget working on windows. Follow the steps from http://kivy.org/docs/installation/installation-windows.html#send-to-method to create a shortcut to execute your kivy apps.

Now you can go directly to the garden path using a file explorer, do right click on test_plt.py and send to kivy-2.7.bat which will start the application.

Categories: kivy, matplotlib Tags: , ,
  1. David
    September 4th, 2015 at 04:26 | #1

    Hi Andnovar

    Thanks for these instructions. I understand that ‘python setup.py install’ installs a Python Package from source. Which package is being installed here?


  2. David
    September 11th, 2015 at 04:33 | #4

    Hi Andnovar

    Please will you add some installation notes for Linux?


  3. September 11th, 2015 at 05:45 | #5

    Hi David, for linux you can read the source code documentation (https://github.com/kivy-garden/garden.matplotlib/blob/master/backend_kivy.py), certainly I will move that to the readme of the garden package to make it more visible. If using linux after installing kivy and matplotlib you would need to install the garden as explained here: http://kivy.org/docs/api-kivy.garden.html .

    garden install matplotlib


    garden install –app matplotlib

    should make it and you would be able to use the kivy.garden.matplotlib in your app. I will write a post about this from a fresh ubuntu installation later on.

    • David
      September 14th, 2015 at 10:05 | #6

      Hi Andnovar

      I’m really struggling to get this working on Fedora (it’s fine on Windows). I would be very grateful if you could provide some instructions for Linux please, even if it’s for Ubuntu.

      Best regards


  1. No trackbacks yet.