Reputation: 2476
I've been looking at math notation and different packages but have yet to find anything that lets me print xbar (the average x).
I am hoping to use xbar as a label in matplotlib.
Any suggestions?
Thank you. Cheers
Upvotes: 4
Views: 20877
Reputation: 679
If you are using jupyter you can simply do this for one letter (x):
$\bar x$
#or for a string
$\overline {xyzabc}$
#note that one $ will give you an inline output and $$...$$ would start
#a new line after your output
Upvotes: 4
Reputation: 338
If you want to use x bar as a label in matplotlib, you can do it like this:
plt.ylabel(r'$\bar{x}$')
Upvotes: 11