如我所见,您使用了声明式管道语法。在这种情况下,您需要定义agent部分。来自官方文档:agent none在 Pipeline 的顶层定义可确保不会不必要地分配 Executor。使用agent none还强制每个stage部分包含自己的agent部分。所以,我认为您在agent none管道的顶层使用,这就是为什么您需要agent在舞台内添加部分。像这样的东西:pipeline { agent none stages { stage('reports') { agent { docker 'openjdk:8-jre' } steps { script { allure([ includeProperties: false, jdk: '', properties: [], reportBuildPolicy: 'ALWAYS', results: [[path: 'target/allure-results']] ]) } } } }}对于脚本化管道,您需要使用此语法(有关更多详细信息,请参阅 allure文档):node {// script bodyallure([ includeProperties: false, jdk: '', properties: [[key: 'allure.issues.tracker.pattern', value: 'http://tracker.company.com/%s']], reportBuildPolicy: 'ALWAYS', results: [[path: 'target/allure-results'], [path: 'other_target/allure-results']] ])}
2 回答

偶然的你
TA贡献1841条经验 获得超3个赞
在不深入研究 Line2D 艺术家的情况下(如果可能的话)这样做的唯一可能性是绘制两条不同的线:
ax = plt.gca()
df.iloc[:-1].plot(ax=ax, label='Data', color='C0')
df.iloc[-2:].plot(ax=ax, label='Data', color='C0', ls=':')
plt.xticks(df.index, df['quarter'].values)
ax.legend(['Data', 'Prediction'])
为了更轻松地处理数据,我建议更改以下几点:
从季度数据中制作时间戳
为数据和预测创建一个单独的列,将每列中所有不可用的值设置为 np.nan

长风秋雁
TA贡献1757条经验 获得超7个赞
通过两次调用 plot 来分别绘制它们;只是切片你的阵列
plt.plot(x[:2018-4] + x[2019-1:], y[:2018-4] + y[2019-1:])
plt.plot(x[2018-4:2019-1], y[2018-4:2019-1])
还有一个关键字参数来确保它们都具有相同的颜色;iirc 它只是color=蓝色的,例如
添加回答
举报
0/150
提交
取消