Pritesh Gohil
1 min readAug 13, 2020

--

Thank you, Fausto! I'm glad that you liked my artcile and sorry for the delayed response. "h1 / 2." and ""%d" % h1" are two different parts.

This is used in plt.text(x, y, s, fontdict=None, **kwargs) where x-y is the coordinates of the graph to place text and s is the string that you want to write.

x = r1.get_x() + r1.get_width() / 2.0 (will give you center postition of first bar i.e. Q1)

y = h1 / 2. (will give you center position of first category in first bar i.e. jeans in Q1)

s = "%d" % h1 (will give you the jeans quantity as a string to write in figure). It can also be writen like this "{}".format(h1)

--

--

No responses yet