cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
JMP is taking Discovery online, April 16 and 18. Register today and join us for interactive sessions featuring popular presentation topics, networking, and discussions with the experts.
Choose Language Hide Translation Bar
scottahindle
Level IV

How to script a copy / paste of a chart for customized use in a new window?

I would like to summarise numerous data sets in control charts and display all the charts nicely on one form (new window) using h list box and v list box functions. Hence some scripting to copy/paste in some way is in mind.

In consolidating so many charts space on the new window starts to get constrained. Hence I would like to not include the top outline box in each chart's display which always has the default title "Control Chart". 

I would, however, like in all cases to preserve the second outline box since it offers me a customised title for each chart.

Attached are examples of the usage of "h list box" that I have in mind.

If it easier to copy and paste frame contents let me know. I could then just use text boxes above each control chart in my consolidation. If this option is best please comment on how to best use copy frame contents and paste frame contents.

The attached pdf may be easier to understand because my aim is shown visually.

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

Re: How to script a copy / paste of a chart for customized use in a new window?

Here is one way to do what you want

Names Default To Here( 1 );

dt = Current Data Table();
cc1 = Control Chart( invisible, Sample Label( :Sample ), Group Size( 1 ), KSigma( 3 ), Chart Col( :Y1, Individual Measurement ) );

cc2 = Control Chart( invisible, Sample Label( :Sample ), Group Size( 1 ), KSigma( 3 ), Chart Col( :Y2, Individual Measurement ) );
cc3 = Control Chart( invisible, Sample Label( :Sample ), Group Size( 1 ), KSigma( 3 ), Chart Col( :Y3, Individual Measurement ) );
		
cc4 = Control Chart( invisible, Sample Label( :Sample ), Group Size( 1 ), KSigma( 3 ), Chart Col( :Y4, Individual Measurement ) );
		
win = New Window( "Test", 

	hlb1 = H List Box(
		
	),
	hlb2 = H List Box(	
		
	)
);

hlb1 << append( Report( cc1 )[Outline Box( 2 )] );
hlb1 << append( Report( cc2 )[Outline Box( 2 )] );
hlb2 << append( Report( cc3 )[Outline Box( 2 )] );
hlb2 << append( Report( cc4 )[Outline Box( 2 )] );
Jim

View solution in original post

3 REPLIES 3
txnelson
Super User

Re: How to script a copy / paste of a chart for customized use in a new window?

Here is one way to do what you want

Names Default To Here( 1 );

dt = Current Data Table();
cc1 = Control Chart( invisible, Sample Label( :Sample ), Group Size( 1 ), KSigma( 3 ), Chart Col( :Y1, Individual Measurement ) );

cc2 = Control Chart( invisible, Sample Label( :Sample ), Group Size( 1 ), KSigma( 3 ), Chart Col( :Y2, Individual Measurement ) );
cc3 = Control Chart( invisible, Sample Label( :Sample ), Group Size( 1 ), KSigma( 3 ), Chart Col( :Y3, Individual Measurement ) );
		
cc4 = Control Chart( invisible, Sample Label( :Sample ), Group Size( 1 ), KSigma( 3 ), Chart Col( :Y4, Individual Measurement ) );
		
win = New Window( "Test", 

	hlb1 = H List Box(
		
	),
	hlb2 = H List Box(	
		
	)
);

hlb1 << append( Report( cc1 )[Outline Box( 2 )] );
hlb1 << append( Report( cc2 )[Outline Box( 2 )] );
hlb2 << append( Report( cc3 )[Outline Box( 2 )] );
hlb2 << append( Report( cc4 )[Outline Box( 2 )] );
Jim
ih
Super User (Alumni) ih
Super User (Alumni)

Re: How to script a copy / paste of a chart for customized use in a new window?

To add to Jim's post:

  1. Line Up Boxes are handy for this sort of thing, and
  2. You can set the page size so they just fit on a piece of paper.
Names Default To Here( 1 );

dt = Current Data Table();
cc1 = Control Chart( invisible, Sample Label( :Sample ), Group Size( 1 ), KSigma( 3 ), Chart Col( :Y1, Individual Measurement ) );
cc2 = Control Chart( invisible, Sample Label( :Sample ), Group Size( 1 ), KSigma( 3 ), Chart Col( :Y2, Individual Measurement ) );
cc3 = Control Chart( invisible, Sample Label( :Sample ), Group Size( 1 ), KSigma( 3 ), Chart Col( :Y3, Individual Measurement ) );
cc4 = Control Chart( invisible, Sample Label( :Sample ), Group Size( 1 ), KSigma( 3 ), Chart Col( :Y4, Individual Measurement ) );
		
win = New Window( "Test", lub = Line Up Box( N Col(2) ) );

lub << append( Report( cc1 )[Outline Box( 2 )] );
lub << append( Report( cc2 )[Outline Box( 2 )] );
lub << append( Report( cc3 )[Outline Box( 2 )] );
lub << append( Report( cc4 )[Outline Box( 2 )] );
lub << append( Report( cc1 )[Outline Box( 2 )] );

win << Set page setup(
    margins( 0.5, 0.5, 0.5, 0.5 ),
    scale( 1.0 ),
    portrait( 0 ),
    paper size( "Letter" )
);

fn = "$TEMP/JMP PDF Example.pdf";
win << Save PDF( fn );
Open( fn );
wait( 10 );
Delete File( fn )
scottahindle
Level IV

Re: How to script a copy / paste of a chart for customized use in a new window?

Thank you for this answer too!