你好,
是否有相对简单的脚本语言,我可以作为 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");
此脚本中的关键组件为图形命名:“输出 = 图形...”
然后使用以下命令保存它“输出<<保存图片....”