How to use PrettyPlotLib

A common method to generate plots in Python is to use the matplotlib module. While functional, these plots are not very beautiful to look at. PrettyPlotLib aims to fix this by generating beautiful plots with only small modifications to the code that is already using matplotlib.

I prefer to install this module and its dependencies using Pip:

$ sudo pip install brewer2mpl
$ sudo pip install prettyplotlib

To use this module, change the plot and legend functions in your code to use the prettyplotlib module instead of matplotlib.pyplot.

For example:

# Old code
import matplotlib.pyplot as mplot

mplot.legend(loc="best", numpoints=1)

# New code
import matplotlib.pyplot as mplot
import prettyplotlib as pplot

pplot.legend(loc="best", numpoints=1)

Note: PrettyPlotLib is not being actively developed anymore. Its creator recommends using the Seaborn module with Matplotlib instead.

Tried with: PrettyPlotLib 0.1.7, Python 2.7.6 and Ubuntu 14.04

Leave a Reply

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

You are commenting using your 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