我想繪製不同的線型與SN ==“R06CAD00B0(GOLD)的條件

第二張圖有效嗎?我無法訪問JMP 11,所以我無法測試它。 Graph Builder從JMP 11到JMP 14將有顯著差異。
txnelson,我用你的第一個腳本繪製圖形,但是Dashed線是SN“12”,腳本不起作用。順便說一句,我的JMP版本是11。
下面是兩個示例腳本,說明如何使用“屬性”設置更改SN的特定值的線條樣式。 第一個顯示不必指定位置以使代碼正確運行。 第二個顯示,如果您想支持該位置,您可以確定該位置應該是什麼,然後將其插入到代碼中。
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA\big class.jmp" );
// Change the age column to be character and change it's name to SN,
// to mimic the SN in the graph from the first entry for the discussion
dt:age << data type( character ) << set name( "SN" );
// Change the value of the age=15 to age=15(Gold)
For Each Row( If( dt:SN == "14", dt:SN = "14(Gold)" ) );
// Create the code for the graph. Note,
theGraph = Expr(
Graph Builder(
Variables( X( :sex ), Y( :height ), Overlay( :SN ) ),
Elements( Line( X, Y, Legend( 9 ) ) ),
SendToReport(
Dispatch(
{},
"400",
ScaleBox,
{Legend Model(
9,
Properties( 0, {Line Style( "Dashed" )}, Item ID( "14(Gold)", 1 ) )
)}
)
)
);
);
// Run the graph with all of the data
theGraph;
// Create a new table with no age 12 individuals, so the position of 15(Gold)
// changes in the graph
dt << select where( :SN != "12" );
dtNo12 = dt << subset( selected rows( 1 ), selected columns( 0 ) );
// Run the graph with the no 12 data
theGraph;
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA\big class.jmp" );
// Change the age column to be character and change it's name to SN,
// to mimic the SN in the graph from the first entry for the discussion
dt:age << data type( character ) << set name( "SN" );
// Change the value of the age=15 to age=15(Gold)
For Each Row( If( dt:SN == "14", dt:SN = "14(Gold)" ) );
// Create the code for the graph. Note,
theGraph = Expr(
// Find the position
Summarize( byGroup = by( :SN ) );
thePosition = Loc( byGroup, "14(Gold)" ) - 1;
Eval(
Substitute(
Expr(
Graph Builder(
Variables( X( :sex ), Y( :height ), Overlay( :SN ) ),
Elements( Line( X, Y, Legend( 9 ) ) ),
SendToReport(
Dispatch(
{},
"400",
ScaleBox,
{Legend Model(
9,
Properties( __pos__, {Line Style( "Dashed" )}, Item ID( "14(Gold)", 1 ) )
)}
)
)
)
),
Expr( __pos__ ), thePosition
)
);
);
// Run the graph with all of the data
theGraph;
// Create a new table with no age 12 individuals, so the position of 15(Gold)
// changes in the graph
dt << select where( :SN != "12" );
dtNo12 = dt << subset( selected rows( 1 ), selected columns( 0 ) );
// Run the graph with the no 12 data
theGraph;對不起,我沒有說清楚我的回答。 我給您的說明將為您提供進行建議更改所需的特定語法。 然後我假設您將獲取該信息,並根據您的規範構建一個腳本,該腳本將使用語法對所有必要的圖形進行更改。
不,你不明白我的意思,我想在許多圖中用虛線製作一個特殊的SN。複製腳本無法做到。
我知道這種方法,但我有很多圖表來改變線型。我怎麼能通過腳本來做到這一點。