我希望我的代码创建一个带有标题的图表。使用下面的代码,图表得到了创建,但没有标题。有人能告诉我我做错了什么吗?
import pandas as pd
import networkx as nx
from networkx.algorithms import community
import matplotlib.pyplot as plt
from datetime import datetime
...
G = nx.from_pandas_edgelist((df), 'AXIS1', 'AXIS2');
nx.draw(G,with_labels=True)
plt.title('TITLE')
plt.axis('off')
plt.savefig('test.png');