Note that there are some explanatory texts on larger screens.

plurals
  1. POxaxis label positioning (2D)
    primarykey
    data
    text
    <pre><code>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] ] </code></pre> <p>See Photo: <a href="http://s1362.photobucket.com/user/superempl/media/figure_1_zps782354d7.png.html" rel="nofollow">http://s1362.photobucket.com/user/superempl/media/figure_1_zps782354d7.png.html</a></p> <p>I need to shift the x-axis labels to the right. I've tried:</p> <pre><code>plot.set_xticklabels(headings,multialignment='right') </code></pre> <p>but this had no effect.</p> <p>Could someone explain what must be done to alter the position of these labels to the centre of each bar.</p> <p>My code is as follows:</p> <pre><code>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() </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload