I have a bunch of Nx1 plots made of subplots (most are 7x1, but some are 5x1, etc). The idea is that there are 3 zones to be in, and 7 timed events of varying time lengths, and I want to see each timed event in order, with a plot of the time in minutes spent in a zone. I want each subplot to have the proper y axes label ticks (minutes) as well as a label (P1 through P7 in this case, but some are P1 through P5, etc), but all the x axes turned off except for the bottom one which are my own ticks, in words. I'm pulling from here and here.
The problem I have is the bottom-most subplot not only has my word text ('Zone 1', 'Zone 2'..), but also has numbers that are meaningless for me (ticks from 0 to 1), and the y axes have the subplot ticks that are correct (going from 0 to 10 or so) but also an over-all marking from 0 to 1 which is senseless. I want to nuke the senseless over-all x axis numbers, and the over-all senseless y axes numbers.
How do I remove the unwanted tick numbers from the over-all plot?
import matplotlib.pyplot as plt
import numpy as np
plotlist = [[0, 0, 690], [0, 0, 1030], [0, 0, 470], [30, 10, 730], [0, 0, 460], [20, 0, 540], [0, 0, 380]]
numpresses = 7
fig = plt.figure()
objects = ('Zone 1', 'Zone 2', 'Zone 3')
y_pos = np.arange(len(objects))
plt.title('Time spent in zones (minutes)')
plt.ylabel('Minutes spent in zone')
for subploti in range(numpresses):
ax = fig.add_subplot(numpresses, 1, (subploti + 1))
axes = plt.gca()
axes.get_xaxis().set_visible(False)
axes.set_ylabel('P %i' %(subploti + 1))
mins = [x / 60. for x in plotlist[subploti]]
plt.bar(y_pos, mins, align='center', alpha=0.5)
plt.xticks(y_pos, objects)
axes = plt.gca()
axes.get_xaxis().set_visible(True)
plt.show()