I am trying to make a visually appealing graph in Python. I used the Randal Olson example http://www.randalolson.com/2014/06/28/how-to-make-beautiful-data-visualizations-in-python-with-matplotlib/ here and tried to make some adjustments.
My data is simple
dispute_percentage Out[34]: 2015-08-11 0.017647 2015-08-12 0.004525 2015-08-13 0.006024 2015-08-14 0.000000 2015-08-15 0.000000 2015-08-17 0.000000
The problem is that the data starts to load in February 2015, and I want to start showing in April 2015.
Here is my code
from __future__ import division from collections import OrderedDict import pandas as pd from collections import Counter from pylab import * import datetime as datetime dispute_percentage.plot(kind = 'line') plt.xlabel('Date') plt.ylabel('Percent') plt.title('Percent Disputes In FY2015')
xlim is what I struggle with. I get an error
File "C:/Mypath/name.py", line 52, in <module> dstart = datetime(2015,4,1) TypeError: 'module' object is not callable
If someone can help with this, it will be great. Any contribution to trying to make it more beautiful will also be appreciated.
source share