The only way I could get around this is to take all the Arabic words in the pandas column that I need to plot and reshape it with arabic_reshaper
, append them to a list and have this list as my x axis:
# reshaping the arabic words to show correctly on matplotlib
import arabic_reshaper
import matplotlib.pyplot as plt
from bidi.algorithm import get_display
x = [ ]
for item in df.column_name.values:
x.append(get_display(arabic_reshaper.reshape(item)))
Of course you need to install the arabic_reshaper
and the bidi.algorithm
packages first