恆定的圖例顏色你好,
我建立了一個圖表(條形圖)並透過右鍵單擊並複製腳本更改了圖例顏色(以及條形圖顏色)
SendToReport(
Dispatch(
{},
"400",
ScaleBox,
{Legend Model(
8,
Properties( 0, {Fill Color( 10 )}, Item ID( "category", 1 ) ),這是更大圖表的一部分。
當我運行腳本並包含本地資料過濾器時,類別的顏色正在改變。 這是有害的,因為我希望獨立於過濾器的類別具有相同的顏色。
親切的問候,
回覆:恆定的圖例顏色您無法透過變更儲存格顏色或將顏色的行狀態變更為指定顏色來變更填滿色彩。長條圖是一個計算列,與顯示和每個單獨的行沒有直接關係。因此,您需要透過更改圖形產生器程式碼中的填滿顏色來處理整個條形。以下是如何執行此操作的範例:
Graph Builder(
Size( 534, 418 ),
Show Control Panel( 0 ),
Variables( Y( :height ), Y( :weight, Position( 1 ) ) ),
Elements( Bar( Y( 1 ), Y( 2 ), Legend( 3 ) ) ),
SendToReport(
Dispatch(
{},
"400",
ScaleBox,
{Legend Model(
3,
Properties( 0, {Fill Color( 5 )}, Item ID( "Mean(height)", 1 ) ),
Properties( 1, {Fill Color( 5 )}, Item ID( "Mean(weight)", 1 ) )
)}
)
)
);
回覆:恆定的圖例顏色我對兩列(高度和重量)中的所有單元格進行了著色,以在條形圖中獲得相同的顏色,但它不起作用
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
:height << Color Cell By Value( 1 ); // turn on the cell coloring
For( i = 1, i <= N Row( dt ), i++,
If( Column( dt, "height" )[i] >= 0,
Column( dt, "height" ) << Color Cells( 5, {i} ),
Column( dt, "height" ) << Color Cells( 0, {i} )
));
:weight << Color Cell By Value( 1 ); // turn on the cell coloring
For( i = 1, i <= N Row( dt ), i++,
If( Column( dt, "weight" )[i] >= 0,
Column( dt, "weight" ) << Color Cells( 5, {i} ),
Column( dt, "weight" ) << Color Cells( 0, {i} )
));
Graph Builder(
Size( 534, 418 ),
Show Control Panel( 0 ),
Variables( Y( :height ), Y( :weight, Position( 1 ) ) ),
Elements( Bar( Y( 1 ), Y( 2 ), Legend( 3 ) ) )
);回覆:恆定的圖例顏色謝謝,
恐怕下一個問題的答案是顯而易見的,但是如何透過腳本將列中的所有值變更為單一顏色?
回覆:恆定的圖例顏色您應該能夠取消單擊過濾器中的“包含”複選框,以允許圖表的顏色保持不變。 「包含」複選框告訴過濾器在計算圖表時包含/排除值,因此當未選中時,它將使用所有值,從而計算顏色並保存從過濾值到過濾值。回覆:恆定的圖例顏色您可以使用列屬性 - 值顏色來鎖定圖例顏色。 這將確保無論您使用什麼平台以及應用什麼本地資料過濾器,每個群組的顏色都不會改變。