%load_ext autoreload %autoreload 2 %matplotlib inline import numpy as np import datetime as dt import pickle import pandas as pd import datetime from datetime import timedelta, date from datetime import date as dt import math import os import matplotlib.pyplot as plt plt.style.use('ggplot') from pylab import plot,show from matplotlib import ticker from matplotlib.backends.backend_pdf import PdfPages import matplotlib.dates as mdates import pylab as pl x_min_global=datetime.date(2010,1, 1)- timedelta(days=180) x_max_global=datetime.date(2015,1, 1)+ timedelta(days=180) d = pd.DataFrame(0, index=np.arange(155),columns=['Zeros']) d = pd.DataFrame(0, index=np.arange(2),columns=['Zeros']) wd=os.getcwd() def format_date(x, pos=None): return pl.num2date(x).strftime('%Y-%m-%d') with PdfPages(wd+'/Plots.pdf') as pdf:
My problem is that in the graph generated by the code above the axis of the figure, the subwords seem to overlap (see the red rectangles in the picture). I tried to disable the axes in the figure. However, I could not figure it out.
Any help is appreciated. Thanks.
Code / Task Output: 
source share