本文整理汇总了Python中matplotlib.collections.LineCollection.remove方法的典型用法代码示例。如果您正苦于以下问题:Python LineCollection.remove方法的具体用法?Python LineCollection.remove怎么用?Python LineCollection.remove使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类matplotlib.collections.LineCollection
的用法示例。
在下文中一共展示了LineCollection.remove方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: plotLoop
# 需要导入模块: from matplotlib.collections import LineCollection [as 别名]
# 或者: from matplotlib.collections.LineCollection import remove [as 别名]
def plotLoop(myFiles,fbase,tlist,grid,plot,vmax,vwidth,d,dateStr):
import datetime as dt
#print args
#myFiles,fbase,tlist,grid = args
#create a pygrid item
myGrid = pygrid()
#create a MPL figure
myFig = plt.figure()
print tlist
#draw a map
myMap = drawPygridMap(myFig,myGrid,grid=grid)
for ctime in tlist:
myGrid.delVecs()
print ctime
print 'plotting'
#read the files we have opened
for f in myFiles:
#print 'reading'
#read a record
print ctime
readPygridRec(f,myGrid,datetimeToEpoch(ctime),-1)
t1=dt.datetime.now()
#get the vectors
print 'drawing'
circs,lines,intensities = drawPygridVecs(myGrid,myMap,plot=plot,vmax=vmax)
#add the collection of vectors to the figure
ccoll = plt.scatter(circs[0],circs[1],s=.5,c='k')
lcoll = LineCollection(numpy.array(lines),linewidths=vwidth,zorder=10)
lcoll.set_array(numpy.array(intensities))
myFig.gca().add_collection(lcoll)
#do the colormapping
pydarn.plot.plotUtils.genCmap(myMap,lcoll,'grid',[0,vmax],colors='aj',map=1)
txt = plt.figtext(.5,.95,ctime.strftime("%Y/%m/%d %H:%M:%S"),weight=550,size='large',ha='center')
t2 = dt.datetime.now()
myFig.savefig(d+'/'+str(int(datetimeToEpoch(ctime)))+'.'+fbase+'.'+plot+'.svg', bbox_inches=0)
t3 = dt.datetime.now()
print 'drawing took', t2-t1
print 'saving took',t3-t2
ccoll.remove()
lcoll.remove()
myFig.texts.remove(txt)