I need to save my plots in SVG format. Unfortunately, I often need to generate a large amount of plots, and it is therefore not an alternative to use the GUI approach. JSL has a function for saving pictures
db<<Save Picture("" | "pathname", "format")
but according to the JSL Syntax Reference it only supports PDF, PNG, GIF, JPG and EMF. How can I save my plots in SVG using JSL?
(In case someone finds this post and wants to use the GUI approach but don't know how:
In JMP 15, the documentation indicates that you can save a picture in SVG format. Here is the section from the 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.
Thanks for answering! I am using JMP13, whose documentation of Save Picture() does not mention it being able to save SVG files. However, the example provided by @Craige_Hales demonstrated that it was possible. That issue aside I managed to find the bug in my code.