Home > kivy, matplotlib > ggplot for python calling kivy matplotlib backend

ggplot for python calling kivy matplotlib backend

Based on the grammar of graphics, ggplot is a library for plotting graphs in R. By doing some readings seems like ggplot is a very good choice to produce multi-layered graphs. I found a package for python which provides a ggplot structure wrapped into matplotlib instructions. I gave it a try by installing it from source https://github.com/yhat/ggplot and then, since the library is heavily depending on matplotlib I changed the backend by default to use kivy by placing these two lines on top of each example tested:


import matplotlib
matplotlib.use('module://kivy.garden.matplotlib.backend_kivy')

The main advantage in my case is the minimum set of instructions required for creating plots. Some resources can be found here http://blog.yhathq.com/posts/ggplot-for-python.html. I have not fully tested it but I am giving it a try.

smooth.py ggplot

  1. No comments yet.
  1. No trackbacks yet.