import networkx as nx
import matplotlib.pyplot as plt
from pylab import mpl
social_network = {'小张': ['老王', '小刘', '小西'], '小西': ['张三','李四','陈八'], '陈八':['小七', '王五']}
mpl.rcParams['font.sans-serif'] = ['Simhei']
social_gragh = nx.Graph(social_network)
nx.draw(social_gragh, with_labels=True)
plt.show()