list_character = ["🖳", "🐍"]
from pywaffle import Waffle
from matplotlib import pyplot as plt
n_row = 4
n_column = 5
import numpy as np
list_value = np.ones(len(list_character))
fig = plt.figure(
FigureClass=Waffle,
rows=1,
columns=len(list_character),
values=list_value,
characters=list_character,
font_file="~/.fonts/Symbola.ttf",
font_size=50
)
plt.savefig("replaced_character.pdf")
plt.close("all")
yields the attached file (two snakes instead of a computer and a snake).
The computer alone is correctly printed. Inverting the order yields two snakes.
There seem to be a problem when saving figures as pdf with matplotlib.pyplot.savefig and using the characters argument in Waffle: some characters are replaced by others.
yields the attached file (two snakes instead of a computer and a snake).
The computer alone is correctly printed. Inverting the order yields two snakes.
replaced_character.pdf