导入osimportnumpy作为npimportmatplotlib.pyplot文件作为pltfrom插入导入interp1dfrom插入导入样条曲线####注意:根据需要更改这些变量MetricPath='./Output/';Path=MetricsPath+'2_节点ŠAllMetrics/';ŠMetricsPath1=MetricsPath+'2_节点ŠFrmTx/';Header='GenRate\tmilli{T\tBackoff\tNEQue}\tCCA{Ttl\tSucc\tFail}\tFrm{Tx\tDiscrd\tSucc}\tCollCnt\n';SaveImagesPath=MetricsPath+'2_node_AllMetrics/';#绘图应保存到savemetricsfile=MetricsPath+'AllMetrics.txt文件“;#用于保存EGATEmetricsplotShow的文件名=0;#如果设置为1,则显示所有plotsTimeConversionFactor=1000#在文本文件中生成时间单位所需的转换系数asssecondsY#ulimits=[];##Coustomisedplotfunctiondefmyplot(X,Y,ShowRnot,Ylabel,Xlabel,Title,PlotName):全局YŠulimitsif(PlotName==SaveImagesPath+'测试版.png'):plt。