1

I have plotted a graph as shown in the image below.

How do I not show the bit surrounded by the red box?

enter image description here2

Code is below:

import matplotlib.dates as md    
import matplotlib.pyplot as plt

fig = plt.figure()

ax=fig.add_subplot(1,1,1)

plt.plot(ListTime,ListLeiture)

hours = md.HourLocator(byhour=range(8,16,1))

fmt = md.DateFormatter('%d\n%H:%m:%S')

ax.xaxis.set_major_locator(hours)

ax.xaxis.set_major_formatter(fmt)

fig.autofmt_xdate(bottom=0.2, rotation=45)

ax.grid()
plt.show()
DavidG
  • 24,279
  • 14
  • 89
  • 82
  • 2
    Hi there! In order to improve your chances of getting good answers I will give you a few tips how your question can be improved: **1.** Formulate your question as text. The image alone is not enough to guess what you want. **2.** Provide a standalone example that does not depend on your data to run. **3.** Use the code indendation feature to format code as code. – MB-F Feb 10 '16 at 10:57
  • 1
    Possible duplicate of [Python/Matplotlib - Is there a way to make a discontinuous axis?](http://stackoverflow.com/questions/5656798/python-matplotlib-is-there-a-way-to-make-a-discontinuous-axis) – tmdavison Feb 10 '16 at 12:57

0 Answers0