- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Saving multiple graphs in a window report to a single svg
I am trying to save all the graphs in a bivariate report to an svg. When I use "Save as" to do it it works fine. I can't get it to work in jsl.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Saving multiple graphs in a window report to a single svg
According to Scripting Index << Save Window Report is used to save the report as JMP report file
I think you have to use Save Picture if you wish to have SVG and if you are using By variables, you might have to wrap your report to new window (or get a reference to the report)
Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
nw = New Window("",
dist = dt << distribution(Column(:height), By(:age));
);
nw << Save Picture("$DOWNLOADS/test.svg", "svg");
And why use save picture is based on this Export option and a guess
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Saving multiple graphs in a window report to a single svg
Bingo! Adding New Window worked. Thanks Jarmo!BLAH_REPORT = New Window("", Bivariate(
Y( :Data ),
X( :pdatetime ),
By( :SEQ, :CATEGORY, :STAGE, :STEP, :MEAS_TYPE ),
Add Text Annotation( Text( "Updated: " || date_today ), Fixed Size( 2 ), Text Box( {1400, 3, 1800, 62} ), Filled( 0 ) ),
SendToReport(
Dispatch(
{},
"Bivar Plot",
FrameBox,
{Row Legend(
:GRP,
Color( 1 ),
Color Theme( "STRONG" ),
Marker( 0 ),
Marker Theme( "" ),
Continuous Scale( 0 ),
Reverse Scale( 1 ),
Excluded Rows( 0 )
), Frame Size( 1367, 480 )}
)
)
);
);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Saving multiple graphs in a window report to a single svg
According to Scripting Index << Save Window Report is used to save the report as JMP report file
I think you have to use Save Picture if you wish to have SVG and if you are using By variables, you might have to wrap your report to new window (or get a reference to the report)
Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
nw = New Window("",
dist = dt << distribution(Column(:height), By(:age));
);
nw << Save Picture("$DOWNLOADS/test.svg", "svg");
And why use save picture is based on this Export option and a guess
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Saving multiple graphs in a window report to a single svg
Thanks jthi. I appreciate the suggestion.
When I use Save picture is saves only one chart from the window report not the whole collection. Using "Save As" and graph type svg saves them all. Not sure how to mimic what save as is doing in jsl.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Saving multiple graphs in a window report to a single svg
Print what your BLAH_REPORT variable contains. Most likely it is a list and you are sending the save message to all of those different plots in that (they will most likely overwrite each other or only first one is being saved). You will have to get the reference to the whole report, you have few options: use new window and create bivariate inside it (see my earlier message) or you could use << top parent on first of the plot to get the highest level reference (replace dist with your variable)
(dist[1] << top parent) << Save Picture("$DOWNLOADS/test.svg", "svg");
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Saving multiple graphs in a window report to a single svg
Bingo! Adding New Window worked. Thanks Jarmo!BLAH_REPORT = New Window("", Bivariate(
Y( :Data ),
X( :pdatetime ),
By( :SEQ, :CATEGORY, :STAGE, :STEP, :MEAS_TYPE ),
Add Text Annotation( Text( "Updated: " || date_today ), Fixed Size( 2 ), Text Box( {1400, 3, 1800, 62} ), Filled( 0 ) ),
SendToReport(
Dispatch(
{},
"Bivar Plot",
FrameBox,
{Row Legend(
:GRP,
Color( 1 ),
Color Theme( "STRONG" ),
Marker( 0 ),
Marker Theme( "" ),
Continuous Scale( 0 ),
Reverse Scale( 1 ),
Excluded Rows( 0 )
), Frame Size( 1367, 480 )}
)
)
);
);