如我所見,您使用了聲明式管道語法。在這種情況下,您需要定義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'])
為了更輕松地處理數(shù)據(jù),我建議更改以下幾點:
從季度數(shù)據(jù)中制作時間戳
為數(shù)據(jù)和預測創(chuàng)建一個單獨的列,將每列中所有不可用的值設置為 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])
還有一個關鍵字參數(shù)來確保它們都具有相同的顏色;iirc 它只是color=藍色的,例如
添加回答
舉報
0/150
提交
取消