autolabels for barcharts

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

autolabels for barcharts

Timmie
Administrator
Hello,
I have a question regarding autolabels for bar charts.

It seems that the pie charts have already incorporated such a functionality [1].
Is there any reason why this isn't built in the bar chart function [2]?


The function I am referring to is:

def autolabel(rects):
    # attach some text labels
    for rect in rects:
        #~ print rect
        height = rect.get_height()
        print height
        ax.text(rect.get_x()+rect.get_width()/2., 1.05*height, '%d'%int(height),
                ha='center', va='bottom')

Thanks in advance for the clarification,
Timmie


[1]
http://matplotlib.sourceforge.net/examples/pylab_examples/pie_demo.html?highlight=autolabel

[2]
http://matplotlib.sourceforge.net/examples/api/barchart_demo.html?highlight=autolabel


_______________________________________________
SciPy-user mailing list
[hidden email]
http://projects.scipy.org/mailman/listinfo/scipy-user
Reply | Threaded
Open this post in threaded view
|

Re: autolabels for barcharts

Timmie
Administrator
Sorry for the noise.
I was to send it to the matplotlib-list.

Please ignore this.



_______________________________________________
SciPy-user mailing list
[hidden email]
http://projects.scipy.org/mailman/listinfo/scipy-user