gnuplot - 如何在 gnuplot 中将 yerror 或 yerrorbar 与linespoints 和其他参数一起使用?
问题描述
我可以使用常规平均值绘制图表。然后我为每个平均值添加了一个新列,即标准偏差。我的数据是这样的:
time,throughputINmean,throughputINstddev,throughputOUTmean,throughputOUTstddev,latency50mean,latency50stddev,latency99mean,latency99stddev
,0,0,0,0,0,0,0,0
"2020-06-08 09:43:45",0,0,0,0,0,0,0.862083,0.195044
"2020-06-08 09:44:00",1385.41,155.736,1385.41,155.737,0,0,0,0
"2020-06-08 09:44:15",1878.42,28.5521,1878.42,28.5521,0,0,0,0
"2020-06-08 09:44:30",2271.56,29.6025,2271.56,29.608,0,0,0,0
"2020-06-08 09:44:45",2642.69,49.2259,2642.69,49.2284,0,0,0,0
"2020-06-08 09:45:00",1627.49,99.2306,1627.49,99.232,0,0,0,0
"2020-06-08 09:45:15",1498.38,44.8282,1498.38,44.8282,0,0,0,0
"2020-06-08 09:45:30",1462.4,18.8785,1462.39,18.8717,0,0,0,0
我在 gnuplot 中使用此脚本进行绘图:
plot t=0 "throughput-vs-latency-50K-8combiners-8reducers-all.csv" u (t==0?(t0=timecolumn(1,myTimeFmt),t=1):NaN, timecolumn(1,myTimeFmt)-t0):(column(2)/1000) skip 2 notitle with linespoints ls 1 axis x1y1 \
, t=0 "throughput-vs-latency-50K-8combiners-8reducers-all.csv" u (t==0?(t0=timecolumn(1,myTimeFmt),t=1):NaN, timecolumn(1,myTimeFmt)-t0):(column(4)/1000) skip 2 notitle with linespoints ls 2 axis x1y1 \
, t=0 "throughput-vs-latency-50K-8combiners-8reducers-all.csv" u (t==0?(t0=timecolumn(1,myTimeFmt),t=1):NaN, timecolumn(1,myTimeFmt)-t0):(column(6)/1000) skip 2 notitle with linespoints ls 3 axis x1y2 \
, t=0 "throughput-vs-latency-50K-8combiners-8reducers-all.csv" u (t==0?(t0=timecolumn(1,myTimeFmt),t=1):NaN, timecolumn(1,myTimeFmt)-t0):(column(8)/1000) skip 2 notitle with linespoints ls 4 axis x1y2 \
然后我只是在最后一行添加了yerror
参数和有关这些值的列。最后一行变成了这样:
, t=0 "throughput-vs-latency-50K-8combiners-8reducers-all.csv" u (t==0?(t0=timecolumn(1,myTimeFmt),t=1):NaN, timecolumn(1,myTimeFmt)-t0):(column(8)/1000):((column(8)/1000)-(column(9)/1000)):((column(8)/1000)+(column(9)/1000)) skip 2 notitle with yerror linespoints ls 4 axis x1y2
但Gnuplot
抱怨这不是一个公认的令牌。我也进行了测试,yerrorbars
我得到了同样的错误。
解决方案
“with yerrorlines”、“with yerrorbars”和“withlinespoints”是三种不同的绘图风格。您不能同时选择两个。因此,如果要将绘图切换为“yerrorlines”,则必须删除关键字“linespoints”。
推荐阅读
- javascript - 我的 ajax 函数不知怎的被伊斯坦布尔所覆盖
- authentication - Git 扩展验证错误
- excel - 数据验证指的是表中的列较少的单元格
- android - 如何在 Android 应用启动器上显示通知点(奥利奥)?
- eclipse-plugin - 如何在 Eclipse 的问题视图中添加附加列?
- javascript - 我的 Node JS 控制台正在显示我想要的文本,为什么我不能将它保存为字符串?
- javascript - 如何删除“访问控制允许标头”?
- vba - 如果excel中的另一个单元格不为空,如何将公式输入到空单元格中
- python - 将项目根目录添加到 sys.path 是一个好习惯吗?
- php - 重写 URL 中的多个路径组件