如何改變透過添加圖形腳本添加的形狀/文字?假設我想使用“添加圖形腳本”在圖表上添加自訂文字或形狀:
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
New Window( "Example",
gb = Graph Builder(
Size( 528, 456 ),
Show Control Panel( 0 ),
Variables( X( :weight ), Y( :height ), Overlay( :sex ) ),
Elements( Points( X, Y, Legend( 9 ) ), Smoother( X, Y, Legend( 10 ) ) ),
)
);
rgb = gb << Report;
framebox = rgb << XPATH( "//FrameBox" );
framebox << Add Graphics Script(
"Front",
Description( "CustomText" ),
{
Text( "left", 0.05, {100, 55}, "This is my custom text" ) ;
Line( {80, 50}, {160, 65} )
}
);
我之後該如何更改字體或字體大小?如何變更線條顏色或樣式?如何取得它們的參考來執行隱藏、顯示、刪除等操作?
自動化和腳本回覆:如何改變透過新增圖形腳本新增的形狀/文字?以下是直接從腳本索引中取得的範例
刪除圖形腳本
訊息
Names Default To Here( 1 );
Open( "$SAMPLE_DATA/Big Class.jmp" );
biv = Bivariate( Y( :weight ), X( :height ), FitLine );
rbiv = biv << report;
framebox = rbiv[frame box( 1 )];
framebox << Add Graphics Script(
Transparency( 0.5 );
Fill Color( {1.0, 0.5, 0.0} );
Polygon( [60, 72, 57], [75, 120, 120] );
);
framebox << Add Graphics Script(
Transparency( 0.5 );
Fill Color( {0.0, 0.5, 1.0} );
Polygon( [60, 72, 57], [150, 120, 120] );
);
Wait( 2 );
framebox << Remove Graphics Script( 2 );
回覆:如何改變透過新增圖形腳本新增的形狀/文字?好的,這涵蓋了其中的一部分內容。
如果我想讓文字變小怎麼辦?或變成藍色?或斜體?該如何實現?
如果我想要線條是虛線並且是藍色的呢?
回覆:如何改變透過新增圖形腳本新增的形狀/文字?腳本索引對所有這些問題都有答案(文字大小、文字字體、文字顏色)
Names Default To Here(1);
New Window("Example",
Graph Box(
Text Size(100);
Text Color("Blue");
Text Font("", "italic");
Text({50, 20}, "label");
)
);
畫筆顏色()、線條樣式()
Names Default To Here(1);
New Window("Line Style Example",
Graph Box(
Frame Size(500, 400),
Line Style("Dotted");
Pen Color("Blue");
Pen Size(2);
Line([10 30 90], [88 22 44]);
);
);
回覆:如何改變透過新增圖形腳本新增的形狀/文字?剩下的我都弄清楚了。它們在圖形腳本中是單獨的命令,而不是「文字」或「線條」的屬性或訊息。
回覆:如何改變透過新增圖形腳本新增的形狀/文字?你好@txnelson ,
這是一個很好的例子,但我認為你應該寫的是「刪除圖形腳本」而不是「刪除圖形腳本」。
順便說一下,腳本索引現已上線。 https
/jsl.jmp.com
您可以直接連結到功能和訊息:
https://jsl.jmp.com/All%20Categories/Display%20Boxes/FrameBox.html#remove-graphics-script
您無法像在 JMP 的腳本索引中那樣直接從網頁運行,但每個腳本的右上角都有一個方便的複製按鈕。線上腳本索引可以幫助 JMP Live 使用者在未安裝 JMP 的裝置上編輯腳本。

我希望你覺得這有用。
~約翰