如何更改圖形產生器中的所有箱線圖置信度鑽石顏色?您好,我希望圖形產生器中的所有箱形圖的置信度顏色為黑色。 請參閱下面的每月銷售資料表示例。 我使用“月份”列作為著色變量,但我的置信菱形不可見,因為它們的顏色與箱形圖相同。

我嘗試添加一個循環將線條顏色設為黑色,但這會將箱線圖顏色變更為灰色
gb = Graph Builder(
Size( 1805, 897 ),
Show Control Panel( 0 ),
Variables( X( :Month ), Y( :Sales ), Color( :Month ) ),
Elements(
Box Plot(
X,
Y,
Legend( 9 ),
Box Style( "Solid" ),
Confidence Diamond( 1 ),
Fences( 0 )
)
)
);
//tried the method of changing the confidence level line color to black for each box plot,
//but it removes all pre-existing colors
bpseg = gb << Xpath( "//BoxPlotSeg" );
bpseg << Line Color (0);

附件還包括數據表,任何幫助將不勝感激
大規模客製化回覆:如何更改圖形產生器中所有箱線圖置信鑽石顏色?透過對您的方法進行一些更改,我能夠實現您想要的目標。

- 創建圖表,但不要選擇信心鑽石
- 右鍵點選圖表並選擇新增=>箱線圖,新增第二個箱線圖
- 在第二個箱線圖的變數中,展開該部分並取消選擇“顏色月份”
- 現在右鍵單擊圖表並選擇第二個箱線圖,然後選擇“置信鑽石”
- 最後,轉到圖例並右鍵單擊 Sales 並將線條顏色變更為黑色
這是圖表中的腳本
Names Default To Here( 1 );
dt = Current Data Table();
Graph Builder(
Variables( X( :Month ), Y( :Sales ), Color( :Month ) ),
Elements(
Box Plot( X, Y, Legend( 4 ), Box Style( "Solid" ), Fences( 0 ) ),
Box Plot( X, Y, Color( 0 ), Legend( 5 ), Confidence Diamond( 1 ) )
),
SendToReport(
Dispatch( {"Box Plot"[2]}, "", OutlineBox, {Close( 0 )} ),
Dispatch(
{},
"400",
ScaleBox,
{Legend Model(
5,
Properties( 0, {Line Color( 0 )}, Item ID( "Sales", 1 ) )
)}
)
)
);