0
的Python代码(蟒2.7)下面在以下不一致的行为结果显示相对于轴线的显示我不理解视窗7运行:Matplotlib轴不显示
1 - 打开一个窗口,并将显示一个没有轴的绘图,显示一个点 2 - 在关闭窗口时,打开另一个窗口,显示一个绘图,显示相同的点,但是这次显示一个轴。
from osgeo import ogr
import pylab
from ospybook.vectorplotter import VectorPlotter
vp = VectorPlotter(False)
myLoc = ogr.Geometry(ogr.wkbPoint)
myLoc.AddPoint(59.5,13)
vp.plot(myLoc,'rs')
pylab.show() ## the plot is displayed --without-- axes displayed
myLoc.AddPoint(59.5,13)
vp.plot(myLoc,'rs')
pylab.show() ## the plot is displayed with axes displayed
请注意,在我的环境中,如果矢量绘图仪交互模式设置为True,pylab.show()打开窗口,但不显示的情节。
那排序它。非常感谢!问题我必须问的是,为什么使用我的原始代码时,只有第二次创建窗口和绘图显示时才会出现刻度线? –