I am trying to use PyWaffle (https://github.com/ligyxy/PyWaffle) to plot waffle charts.
I have installed the module and I have installed the fontawesome fonts (https://fontawesome.com/?from=io) that are used by PyWaffle.
I then run the following code provided in the Git repo.
data = {'Democratic': 48, 'Republican': 46, 'Libertarian': 3}
fig = plt.figure(
FigureClass=Waffle,
rows=5,
values=data,
colors=("#232066", "#983D3D", "#DCB732"),
legend={'loc': 'upper left', 'bbox_to_anchor': (1, 1)},
icons='child', icon_size=18,
icon_legend=True
)
This should return the following plot:
Instead I get the following exception.
FileNotFoundError: [Errno 2] No such file or directory: 'font/FontAwesome.otf'
The steps I used to install the FontAwesome were the ones listed in their website:
I right-clicked on the fonts and selected: Install.