cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Learn how to build custom Python data connectors and further customize JMP’s Data Connector Framework with the Python Data Connector Demo, available now in the JMP Marketplace!
  • See how to create experiments to support product design and ID useful product features. Register for June 12 webinar, 2pm US Eastern Time.

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