你好,
是否有相對簡單的腳本語言,我可以作為 JSL 新手用戶添加到我的條形圖 JSL 文件中,該語言將導出為高分辨率的矢量格式......最好沒有選擇和復制/粘貼帶來的所有“額外內容”我目前使用的方法? 我粘貼到 Illustrator 工作正常,但我仍然需要在 Illustrator 中做很多清理工作,包括(但不限於)奇怪的東西,比如左軸的 tic 標記需要在它們似乎得到後移回原來的位置在粘貼階段“移位”......?
我需要製作其中一些,因此粘貼(甚至直接從 Graph Builder 導出)並不理想。
如果沒有(或者即使是這樣),關於以最少的清理進行粘貼的最佳方法的建議將不勝感激!
謝謝!
你好@ReneeBay
這對你有用嗎?
// Open Data Table: Big Class.jmp
// → Data Table( "Big Class" )
Open( "$SAMPLE_DATA/Big Class.jmp" );
// Launch platform: Distribution
output = Distribution(
Nominal Distribution( Column( :age ) ),
Nominal Distribution( Column( :sex ) ),
Continuous Distribution( Column( :height ) )
);
output << save picture ("C:\Users\Smart\Desktop\output1.svg");
否則看看這個討論中的參考:
https://community.jmp.com/t5/Discussions/JSL-Saving-picture-in-SVG-format/td-p/253434
讓我們知道它是否適合您
謝謝,你好,
我想我不小心點擊了“解決方案”,但實際上這對我來說還沒有用,但我不確定我的語法是否完美。 我在下面粘貼的是腳本的選擇,底部是您的建議。 我已經嘗試了幾次逗號和分號等迭代......放置但我仍然沒有導出文件,只是圖形生成器打開......還有其他建議嗎?!
SendToReport(
Dispatch(
{},
"DataYear",
ScaleBox,
{Min( 2009.5 ), Max( 2019.5 ), Inc( 1 ), Minor Ticks( 1 ),
Label Row( {Automatic Font Size( 0 ), Set Font Size( 10 )} )}
),
Dispatch(
{},
"Polychaeta",
ScaleBox,
{Format( "Fixed Dec", Use thousands separator( 1 ), 15, 0 ), Max( 27000 ),
Label Row(
{Automatic Font Size( 0 ), Automatic Tick Marks( 0 ), Show Minor Ticks( 0 ),
Set Font Size( 10 )}
)}
),
Dispatch(
{},
"400",
ScaleBox,
{Legend Model(
2,
Properties( 0, {Fill Color(RGB color(255,255,0))} ),
Properties( 1, {Fill Color(RGB color(137,68,68))} ),
Properties( 2, {Fill Color(RGB color(255,115,223) )} ),
Properties( 3, {Fill Color(RGB color(0,77,168))} ),
Properties( 4, {Fill Color(RGB color(169,0,230))} ),
Properties( 5, {Fill Color(RGB color(56,168,0))} ),
Properties( 6, {Fill Color(RGB color(230,0,0))} ),
Properties( 7, {Fill Color(RGB color(255,170,0))} ),
Properties( 8, {Fill Color(RGB color(115,223,255))} ),
Properties( 9, {Fill Color(RGB color(156,156,156))} )
)}
),
Dispatch( {}, "graph title", TextEditBox, {Set Font Size( 14 ), Set Text( "Chirikov" )} ),
Dispatch( {}, "X title", TextEditBox, {Set Font Size( 12 ), Set Text( "Year" )} ),
Dispatch( {}, "Y title", TextEditBox, {Set Font Size( 12 ), Set Text( "Abundance (#/m2)" )} )
)
)
(output << save picture ("P:\JMP\test.pdf"));
);
你好@ReneeBay ,
您提供的腳本是部分的。
首先嘗試運行此腳本,看看它是否適合您從您使用的平台生成 svg 文件。
// Open Data Table: Big Class.jmp
Open( "$SAMPLE_DATA/Big Class.jmp" );
// create a graph
output = Graph Builder(
Size( 528, 458 ),
Show Control Panel( 0 ),
Fit to Window( "Off" ),
Variables( X( :weight ), Y( :height ) ),
Elements( Points( X, Y, Legend( 3 ) ), Smoother( X, Y, Legend( 4 ) ) )
);
// save output as SVG
output << save picture ("C:\Users\Smart\Desktop\output1.svg");
此腳本中的關鍵組件為圖形命名:“輸出 = 圖形...”
然後使用以下命令保存它“輸出<<保存圖片....”