<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Trying to export Box Plots as PNG files using JMP Script in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Trying-to-export-Box-Plots-as-PNG-files-using-JMP-Script/m-p/773436#M95457</link>
    <description>&lt;P&gt;Hi, I was trying to automate the exporting step using JSL, I'm using the Save Presentation function but I couldn't get it to work. The .png file is created on my computer but it cannot be open due to "unsupported file type". My understanding is that the Save Presentation function didn't convert the Graph Builder file to PNG file before saving as .jpg file. Is there a way to fix this? Thanks!&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

MyGraph = Function({yCol}, {default local},
    vars = Eval Expr(Variables(
        X(:Test Stage),
        Group X(:Temperature)
    ));
    
    pts = Expr(Box Plot(X));
    
    For(j = 1, j &amp;lt;= Min(8, N Items(yCol)), j++,
        Insert Into(vars, Eval Expr(Y(Expr(yCol[j]),Position( 1 ))));
    );
    
    gb = Expr(
        Graph Builder(
            Size(1255, 981),
            Show Control Panel(0),
            // Variables section will be inserted here
            Elements(Box Plot(X, Y(1), Y(2), Y(3), Y(4), Y(5), Y(6), Y(7), Y(8))),
            Local Data Filter(
                Add Filter(
                    columns(:Test Stage, :Sublot, :Temperature, :Soft Bin),
                    Display(:Test Stage, N Items(4)),
                    Display(:Soft Bin, N Items(15))
                )
            )
        )
    );
    Insert Into(gb, Name Expr(vars));
    
    // Save graph to a PNG file
    png_path = "box_plots.png";
    gb &amp;lt;&amp;lt; Save Presentation("boxplot.png");

    Return(gb);
);

dt = Current Data Table();

graph = MyGraph(::yColName);

New Window("My report",
    VListBox(
        graph,
        HCenter Box(
            btn = Button Box("show distribution")
        )
    )
);

btn &amp;lt;&amp;lt; setScript(
    My Histograms()
);

&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 16 Jul 2024 21:10:07 GMT</pubDate>
    <dc:creator>ARETI052</dc:creator>
    <dc:date>2024-07-16T21:10:07Z</dc:date>
    <item>
      <title>Trying to export Box Plots as PNG files using JMP Script</title>
      <link>https://community.jmp.com/t5/Discussions/Trying-to-export-Box-Plots-as-PNG-files-using-JMP-Script/m-p/773436#M95457</link>
      <description>&lt;P&gt;Hi, I was trying to automate the exporting step using JSL, I'm using the Save Presentation function but I couldn't get it to work. The .png file is created on my computer but it cannot be open due to "unsupported file type". My understanding is that the Save Presentation function didn't convert the Graph Builder file to PNG file before saving as .jpg file. Is there a way to fix this? Thanks!&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

MyGraph = Function({yCol}, {default local},
    vars = Eval Expr(Variables(
        X(:Test Stage),
        Group X(:Temperature)
    ));
    
    pts = Expr(Box Plot(X));
    
    For(j = 1, j &amp;lt;= Min(8, N Items(yCol)), j++,
        Insert Into(vars, Eval Expr(Y(Expr(yCol[j]),Position( 1 ))));
    );
    
    gb = Expr(
        Graph Builder(
            Size(1255, 981),
            Show Control Panel(0),
            // Variables section will be inserted here
            Elements(Box Plot(X, Y(1), Y(2), Y(3), Y(4), Y(5), Y(6), Y(7), Y(8))),
            Local Data Filter(
                Add Filter(
                    columns(:Test Stage, :Sublot, :Temperature, :Soft Bin),
                    Display(:Test Stage, N Items(4)),
                    Display(:Soft Bin, N Items(15))
                )
            )
        )
    );
    Insert Into(gb, Name Expr(vars));
    
    // Save graph to a PNG file
    png_path = "box_plots.png";
    gb &amp;lt;&amp;lt; Save Presentation("boxplot.png");

    Return(gb);
);

dt = Current Data Table();

graph = MyGraph(::yColName);

New Window("My report",
    VListBox(
        graph,
        HCenter Box(
            btn = Button Box("show distribution")
        )
    )
);

btn &amp;lt;&amp;lt; setScript(
    My Histograms()
);

&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 16 Jul 2024 21:10:07 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Trying-to-export-Box-Plots-as-PNG-files-using-JMP-Script/m-p/773436#M95457</guid>
      <dc:creator>ARETI052</dc:creator>
      <dc:date>2024-07-16T21:10:07Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to export Box Plots as PNG files using JMP Script</title>
      <link>https://community.jmp.com/t5/Discussions/Trying-to-export-Box-Plots-as-PNG-files-using-JMP-Script/m-p/773447#M95458</link>
      <description>&lt;P&gt;I figured out that I should be using the function "save picture", it's solved now.&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jul 2024 21:32:50 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Trying-to-export-Box-Plots-as-PNG-files-using-JMP-Script/m-p/773447#M95458</guid>
      <dc:creator>ARETI052</dc:creator>
      <dc:date>2024-07-16T21:32:50Z</dc:date>
    </item>
  </channel>
</rss>

