headings=[['Jan to Feb'], ['Feb to Mar'], ['Mar to Apr'], ['Apr to May'], ['May to June'], ['Jun to July'], ['July to Aug'], ['Aug to Sep'], ['Sep to Oct'], ['Oct to Nov']]
incoming=[[27, 42, 66, 85, 65, 64, 68, 68, 77, 58],
[24, 39, 58, 79, 60, 62, 67, 62, 55, 35],
[3, 3, 8, 6, 5, 2, 1, 6, 22, 23],
[3, 3, 8, 6, 5, 2, 1, 6, 22, 23],
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
]
joint=[[486, 511, 615, 825, 760, 693, 848, 639, 651, 657]
[444, 482, 562, 793, 729, 666, 812, 599, 592, 597]
[42, 29, 53, 32, 31, 27, 36, 40, 59, 60]
[29, 28, 35, 32, 31, 27, 36, 40, 59, 60]
[13, 1, 18, 0, 0, 0, 0, 0, 0, 0]
]
See Photo: http://s1362.photobucket.com/user/superempl/media/figure_1_zps782354d7.png.htmlXAxis позиционирования этикетки (2D)
мне нужно сдвинуть XAxis этикетки вправо. Я пробовал:
plot.set_xticklabels(headings,multialignment='right')
но это не имело никакого эффекта.
Не могли бы вы объяснить, что необходимо сделать, чтобы изменить положение этих меток в центре каждой панели.
Мой код выглядит следующим образом:
import pylab as p
from matplotlib.ticker import MaxNLocator
fig = p.figure(figsize=(20,8))
plot = fig.add_subplot(111)
ind = range(len(headings))
bar1 = plot.bar(ind,joint[0],facecolor='#777777')
bar2 = plot.bar(ind,outgoing[0],facecolor='#B0E0E6')
# x-axis
plot.xaxis.set_major_locator(MaxNLocator(10))
plot.set_xticklabels(headings)
p.show()