cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Register to attend Discovery Summit 2025 Online: Early Users Edition, Sept. 24-25.
  • New JMP features coming to desktops everywhere this September. Sign up to learn more at jmp.com/launch.
Choose Language Hide Translation Bar
NGC_DAquila
Level II

Graph Exporting

I am using a Local Data Filter to change my graph but i want it to iterate through each of the "switchers" and print each onto a powerpoint slide. Is this possible in JMP18?

1 ACCEPTED SOLUTION

Accepted Solutions
jthi
Super User

Re: Graph Exporting

You can use similar idea than you can with column switcher with the exception that data filters are more complicated to manipulate. Below is one option

 

Names Default To Here(1); 

dt = open("$SAMPLE_DATA/Big Class.jmp");
gb = dt << Graph Builder(
	Size(525, 454),
	Show Control Panel(0),
	Variables(X(:weight), Y(:height), Overlay(:sex)),
	Elements(Points(X, Y, Legend(9)), Line Of Fit(X, Y, Legend(11))),
	Local Data Filter(
		Add Filter(columns(:age), Display(:age, N Items(6)))
	)
);

Summarize(dt, items = By(:age));
lbb = (Report(gb) << top parent)["Local Data Filter", ListBoxBox(1)];

pptx_loc = "$TEMP/powerpoint_test.pptx";
gb << Save Presentation(pptx_loc);

For(i = 1, i <= N Items(items), i++,
	lbb << Clear Selection;
	lbb << Set Selected(i);
	gb << Save Presentation(pptx_loc, Append);
	wait(0);
);

// Web(pptx_loc);

Write();

But have you consider using Page instead of Local Data Filter? It is much simpler

Names Default To Here(1); 

dt = open("$SAMPLE_DATA/Big Class.jmp");
gb = dt << Graph Builder(
	Show Control Panel(0),
	Variables(X(:weight), Y(:height), Overlay(:sex), Page(:age)),
	Elements(Points(X, Y, Legend(9)), Line Of Fit(X, Y, Legend(11)))
);


pptx_loc = "$TEMP/powerpoint_test.pptx";
gb << Save Presentation(pptx_loc);

// Web(pptx_loc);

Write();

 

-Jarmo

View solution in original post

2 REPLIES 2
jthi
Super User

Re: Graph Exporting

You can use similar idea than you can with column switcher with the exception that data filters are more complicated to manipulate. Below is one option

 

Names Default To Here(1); 

dt = open("$SAMPLE_DATA/Big Class.jmp");
gb = dt << Graph Builder(
	Size(525, 454),
	Show Control Panel(0),
	Variables(X(:weight), Y(:height), Overlay(:sex)),
	Elements(Points(X, Y, Legend(9)), Line Of Fit(X, Y, Legend(11))),
	Local Data Filter(
		Add Filter(columns(:age), Display(:age, N Items(6)))
	)
);

Summarize(dt, items = By(:age));
lbb = (Report(gb) << top parent)["Local Data Filter", ListBoxBox(1)];

pptx_loc = "$TEMP/powerpoint_test.pptx";
gb << Save Presentation(pptx_loc);

For(i = 1, i <= N Items(items), i++,
	lbb << Clear Selection;
	lbb << Set Selected(i);
	gb << Save Presentation(pptx_loc, Append);
	wait(0);
);

// Web(pptx_loc);

Write();

But have you consider using Page instead of Local Data Filter? It is much simpler

Names Default To Here(1); 

dt = open("$SAMPLE_DATA/Big Class.jmp");
gb = dt << Graph Builder(
	Show Control Panel(0),
	Variables(X(:weight), Y(:height), Overlay(:sex), Page(:age)),
	Elements(Points(X, Y, Legend(9)), Line Of Fit(X, Y, Legend(11)))
);


pptx_loc = "$TEMP/powerpoint_test.pptx";
gb << Save Presentation(pptx_loc);

// Web(pptx_loc);

Write();

 

-Jarmo
statman
Super User

Re: Graph Exporting

All you have to do is save each graph to the JMP Journal (ctrl>j).  Once you have all of the versions of the graphs in the journal, open the journal and export to PowerPoint.

"All models are wrong, some are useful" G.E.P. Box

Recommended Articles