cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Don’t miss your chance to experience Discovery Summit Europe at our best available rate! Early bird registration through 31 Oct.
  • Graph Builder Toolbar streamlines interactive graphing. Creates shortcuts on Report and GraphBuilder Helpers toolbars. Download and install the extension.
  • JMP will suspend normal business operations for our Rest and Recharge Day on Friday, October 2, 2026.
    Regular business hours will resume on Monday, October 5, 2026.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
UserID16644
Level V

Saving distribution plots

Hi all,

 

I have a distribution plot and I wanted to save the image as png. However, the only image that I am getting is the last image generated. How can I save all the plots?

dt_dist = Distribution(
	Nominal Distribution( Column( :age ), Horizontal Layout( 1 ), Vertical( 0 ) ),
	By( :sex )
);
dist = dt_dist << get picture;
dist << Save Picture( "C:\distribution_plot.png", "png" );

UserID16644_0-1687325408382.png

 

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Saving distribution plots

When you use the By() command, the platform returns a list, meaning that dist is actually a list with 2 values (dist[1] and dist[2] in this case). There may be more elegant ways to accomplish this, but one way would be to get a reference to the entire current window using Current Report ():

dt = Open( "$SAMPLE_DATA/Big Class.jmp" );

dt_dist = Distribution(
	Nominal Distribution( Column( :age ), Horizontal Layout( 1 ), Vertical( 0 ) ),
	By( :sex )
);

rpt = Current Report();
dist = rpt << get picture;

dist << Save Picture( "$DESKTOP\distribution_plot.png", "png" );

 

View solution in original post

1 REPLY 1

Re: Saving distribution plots

When you use the By() command, the platform returns a list, meaning that dist is actually a list with 2 values (dist[1] and dist[2] in this case). There may be more elegant ways to accomplish this, but one way would be to get a reference to the entire current window using Current Report ():

dt = Open( "$SAMPLE_DATA/Big Class.jmp" );

dt_dist = Distribution(
	Nominal Distribution( Column( :age ), Horizontal Layout( 1 ), Vertical( 0 ) ),
	By( :sex )
);

rpt = Current Report();
dist = rpt << get picture;

dist << Save Picture( "$DESKTOP\distribution_plot.png", "png" );

 

Recommended Articles