我正在尝试向 Jupyter 笔记本中的现有 OSMnx 图添加一个点,如下所示
import osmnx as ox
import matplotlib.pyplot as plt
G = ox.graph_from_address('1600 Pennsylvania Ave NW, Washington, DC 20500',
distance=500)
fig, ax = ox.plot_graph(G)
ax.scatter(-77.036498, 38.897270, c='red')
plt.show()
但我的观点(-77.036498, 38.897270)没有出现。有任何想法吗?
print (type(fig), type(ax))
<class 'matplotlib.figure.Figure'> <class 'matplotlib.axes._subplots.AxesSubplot'>