cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Check out the JMP® Marketplace featured Capability Explorer add-in
Choose Language Hide Translation Bar

Graph builder subset plots with the same axis labels

Hello, 

I have a big data table and  a script to plot the subset by product. You can see the "where" in the script below.

I would like to keep the x-axis to be the same from product to product. The x-axis has two variables "PROC" and "CoreVoltage".    As you can see from the jpg file, at one "PROC", only some of the "CoreVoltage" showed up. How to show all the "PROC" and "CoreVoltage" combinations so from product to product the plots keep the same x-axis ? 

 

Names Default To Here( 1 );
dt = Current Data Table();
Summarize( dt, prodval = By( :"prod" ), );
n = N Items( prodval );
	
For(i = 1,i<=n,i ++,	
	Graph Builder(
		Size( 1790, 1234 ),
		Variables(
			X( :PROC ),
			X( :CoreVoltage, Position( 1 ) ),
			Y( :"Freq1"n )
		),
		Elements(
			Position( 1, 1 ),
			Heatmap( X( 1 ), X( 2 ), Y, Legend( 2 ), Label( "Label by Value" ) )
		),
		Where( :"prod" == prodval[i]),
		SendToReport(
			Dispatch(
				{},
				"PROC",
				ScaleBox,
				{Add Ref Line( 2, "Solid", "Green", "", 2 ),
				Add Ref Line( 6, "Solid", "Green", "", 2 ),
				Label Row( 1, {Inside Ticks( 1 ), Show Major Grid( 1 )} )}
				/*Label Row( 
					{Tick Mark( Label( "FF" ), Label( "0.57" ) ),
                    Tick Mark( Label( "FF" ), Label( "0.62" ) ),
                    Tick Mark( Label( "FF" ), Label( "0.97" ) )}
				 )}*/
			),
			Dispatch(
				{},
				"Freq1",
				ScaleBox,
				{Min( 1440), Max( 2440 ), Inc(20 ), Minor Ticks( 1 ),
				Label Row( {Show Major Grid( 1 ), Show Minor Grid( 1 )} )}
			),
			Dispatch(
			{},
			"graph title",
			TextEditBox,
			{Set Text( prodval[i] || " Freq vs. PROC & CoreVoltage" )}
			),
		)
	);
)

10 REPLIES 10
txnelson
Super User

Re: Graph builder subset plots with the same axis labels

Have you tried using :Prod as a Page value rather than as part of a Where() clause?

Jim
hogi
Level XII

Re: Graph builder subset plots with the same axis labels

do you need the plots in separate windows?

Re: Graph builder subset plots with the same axis labels

Yes. Do you also recommend using Page for Prod ? To use Page, I have to split data into smaller size chunks. For each smaller chunks, the pages will show the same x-axis. From chunk to chunk, they are different.

Re: Graph builder subset plots with the same axis labels

There are many products. With the current setup, each of them will pop up to a separate window. Using page, the window will be super long.

hogi
Level XII

Re: Graph builder subset plots with the same axis labels


@Pandasgroupby wrote:

Using page, the window will be super long.


yes, a huge issue of "page"

 

- but it got fixed with JMP18:

Graph Builder - align 'pages' next to each other or as grid 

 

So, for up to 30 or 100 products, it should be now OK via page - and much easier to handle than 30- 100 individual plots.

Re: Graph builder subset plots with the same axis labels

Thank you for pointing me to the page grid solution. The grid plot with page option might not work for me. I didn't include in the jsl the y-axis handling. Each y axis range, grid and reference line is different. I don't know how to handle y-axis by scripting on each page. 

jthi
Super User

Re: Graph builder subset plots with the same axis labels

You might also want to consider using Local Data Filter, also remember to link axes

jthi_0-1723050542215.png

jthi_1-1723050562705.png

 

-Jarmo

Re: Graph builder subset plots with the same axis labels

Hi, jthi, 

Somehow my local filter couldn't filter the data. But the filter script works. I'm not sure the difference between the filter and "where". To me the "where" is simpler. 

 

Thank you,

Jane 

Re: Graph builder subset plots with the same axis labels

Thank you everyone for the suggestion. I used a different approach and solved the issue. I used python and added the missing values to the table. It created a much larger table. Not efficient but works for now. If you have other jmp recommendation, please let me know. 

Thanks,

Jane