你好!
我需要以 SVG 格式保存我的绘图。 不幸的是,我经常需要生成大量绘图,因此不能替代使用 GUI 方法。 JSL有保存图片的功能
db<<SAVE picture=""></SAVE>
但根据 JSL Syntax Reference,它仅支持 PDF、PNG、GIF、JPG 和 EMF。 如何使用 JSL 将绘图保存为 SVG?
(如果有人找到这篇文章并想使用 GUI 方法但不知道如何:
- 生成图片后,按 Alt 键。 这将导致弹出一个菜单栏。
- 文件 > 另存为并选择 SVG)
谢谢回答! 我正在使用 JMP13,它的 Save Picture() 文档没有提到它能够保存 SVG 文件。 但是,提供的示例@Craige_Hales证明这是可能的。 除了那个问题,我设法在我的代码中找到了错误。
SVG 到激光切割机见附件的最后几行。 您也可以调整文件目标并运行 JSL。
在 JMP 15 中,文档指示您可以将图片保存为 SVG 格式。这是 JSL Syntax Reference 中的部分
db<<Save Picture(<path>, <format>)
Description
Saves a picture of the display box in the quoted path and with the specified quoted format.
Notes
• If you omit the quoted path argument, you are prompted to name and save the file when running the script.
• Valid file formats include "PDF", "PNG", "GIF", "JPG" or "JPEG", "EPS", "SVG", and "EMF".
• On Windows, the Windows Specific preferences determine the resolution (or DPI), or you
can run the following script:
Pref( Save Image DPI( number ) );
• On macOS, the operating system determines the DPI.
• Use Save Picture to export a report as a PDF file with no headers or footers. Use Save PDF
to include these components.
db<<Save Presentation(<path>, <Template(path)>,
<Insert("Begin"|"End"|n)|Replace("Begin"|"End"|n)|Append>, <Outline
Titles(title location)>, <format>)
Saves display boxes in a Microsoft PowerPoint presentation. You can open the file in any presentation software program.
Optional Arguments
path Saves the file in the quoted path. You must include the .pptx extension in the filename. If you omit the path argument, you are prompted to name and save the file when running the script.
Template(path) Specifies the quoted path of a custom PowerPoint template. Without this argument, JMP uses the default template located in the pptx folder of the installation directory.
Include a simple table in your template, or a default table format is applied to report tables. For an example on Windows, see /pptx/JMPExportTemplate.pptx in the JMP installation folder.
Insert Determines where the slides are inserted in an existing presentation.
– n inserts the slides as the nth slide number.
– "Begin" inserts the slides at the beginning of the presentation.
– "End" inserts the slides at the end of the presentation.
Replace Determines which slides are replaced in an existing presentation. The arguments
are n, "Begin", and "End" as described for Insert.
Append The slides are inserted at the end of an existing presentation.
Outline Titles The location of the outline title and any parent outline titles on the slide.
By default, the immediate parent outline title appears as a slide title above the slide
content, with any parent outline titles positioned in the bottom left corner of the slide.
– "None" omits the slide title above the graphic and the outline titles.
– "Hide" omits the outline titles.
– "TopLeft", "TopRight", "BottomLeft", "BottomRight" determine the position of any of the parent outline titles on the slide.
format The format of the embedded graphics. Options are "Native", "EMF", "PNG", "JPG", "BMP", "GIF", "TIF". On Windows, the native format is EMF. On macOS, the native format is PDF. See “Notes” for compatibility issues. Without this argument, JMP applies the “Image Format for PowerPoint” General preference.
Notes
Windows does not support the native PDF graphics produced on macOS. macOS does not support the native EMF graphics produced on Windows. For cross-platform compatibility, specify "PNG", "JPG", "GIF", or "TIF".
If no arguments are provided, the user is prompted to name and save the file.