【发布时间】:2021-05-24 22:06:20
【问题描述】:
使用matplotlib,我们可以防止使用close函数显示图形
import matplotlib.pyplot as plt
a = range(0,5)
b = range(0,10,2)
plt.plot(a,b, 'r-*')
plt.close()
因为osmnx在后台使用matplotlib,我认为close函数可以以相同的方式使用
import matplotlib.pyplot as plt
import osmnx as ox
graph = ox.graph_from_bbox(41.97278, 41.97614, -87.73993, -87.73755, network_type='drive')
ox.plot_graph(graph,
bbox=[41.97278, 41.97614, -87.73993, -87.73755],
)
plt.close()
不幸的是,这个数字仍然显示出来。
有没有办法阻止显示的数字?
提前致谢。
【问题讨论】:
标签: python matplotlib jupyter-lab osmnx