1

i am trying to make a bar chart using pandas and matplotlib. The data is depicted in the dataframe (champs_by_number_of_matches) bellow and it is Greek.

enter image description here

by typing: champs_by_number_of_matches.plot(kind = 'bar') 

i get the graph bellow. How can i get the x-axis labels to show Greek? This is a frequent problem i have encountered and i dont want to convert the labels to "Greeklish".

enter image description here

Thank you.

George Pamfilis
  • 1,397
  • 2
  • 19
  • 37
  • 2
    I think it's a font issue that can be solved by typing `matplotlib.rc('font', family='Arial')` (from: http://stackoverflow.com/questions/10960463/non-ascii-characters-in-matplotlib) – ayhan Mar 27 '16 at 13:16
  • @ayhan IT WORKS!. but... just in case; are there any other solutions? such as to change axis enconding. i would like a plan B. – George Pamfilis Mar 27 '16 at 13:43
  • 1
    It's not an encoding issue but a font one. The default matplotlib font does not include those characters so you need to change the characters or change the font. – Stop harming Monica Mar 27 '16 at 14:19
  • The new default font in mpl 2.0 will have more code points (and I believe including the greek ones). – tacaswell Mar 27 '16 at 16:05

0 Answers0