When passing data into the following method:
def plot(x,y,dateList):
"""Plot x, y on cartesian plane
"""
host = host_subplot(111)
par = host.twiny()
#Set number of ticks
numTicks = np.arange(0, len(x), step=10)
#Get corresponding timestamps in form of list
j=0
for i in range(len(x)):
if i%10 == 0:
newList.append(dateList[i])
j+=1
# Set x-axis labels ("ticks")
plt.xticks(ticks=numTicks, labels=newList, rotation=45)
# Set axis labels
host.set_xlabel("Time")
host.set_ylabel("Black Carbon Concentration (μg/m3)")
p1, = host.plot(x, label="Indoor")
p2, = par.plot(y, label="Outdoor")
plt.grid(True)
plt.show()
The resultant plot is displayed:
Notice the x-axis labels are halfway cut off. How can I adjust it so it does displays the whole value aside from reducing the font?