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

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

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: