I have a problem, In my case I get names from a database, the error occurs when there is a name that contains letter Ñ for example a last name BOLAÑOS, I used # -- coding: utf8 -- but isn't enough. I read that matplotlib needs a file which should contain special characters. Thanks in advance
This is the code:
# -*- coding: utf8 -*-
import matplotlib.pyplot as plt
import networkx as nx
socialNetworl = nx.Graph()
socialNetworl.add_nodes_from([1,2,3,4,5,6])
socialNetworl.add_edges_from([(1,2),(1,3),(2,3),(2,5),(2,6)])
labels = {1:'King Bolaños', 2:'Lancelot', 3:'shopkeeper', 4:'dead parrot', 5:'Brian', 6:'Sir Robin'}
nx.draw(socialNetworl, node_size = 800, node_color="cyan", labels=labels, with_labels = True)
plt.show()