cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • JMP will suspend normal business operations for our Winter Holiday beginning on Wednesday, Dec. 24, 2025, at 5:00 p.m. ET (2:00 p.m. ET for JMP Accounts Receivable).
    Regular business hours will resume at 9:00 a.m. EST on Friday, Jan. 2, 2026.
  • We’re retiring the File Exchange at the end of this year. The JMP Marketplace is now your destination for add-ins and extensions.

Discussions

Solve problems, and share tips and tricks with other JMP users.
%3CLINGO-SUB%20id%3D%22lingo-sub-843899%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%ED%94%8C%EB%A1%AF%EC%97%90%EC%84%9C%20%EC%82%AC%EC%9A%A9%EC%9E%90%20%EC%A0%95%EC%9D%98%20XY%20%EA%B7%B8%EB%A6%AC%EB%93%9C%20%EA%B0%84%EA%B2%A9%EC%9D%84%20%EC%84%A4%EC%A0%95%ED%95%98%EB%8A%94%20%EB%B0%A9%EB%B2%95%EC%9D%80%20%EB%AC%B4%EC%97%87%EC%9E%85%EB%8B%88%EA%B9%8C%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-843899%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%EC%95%84%EB%9E%98%20%EC%98%88%EC%A0%9C%20%EC%8A%A4%ED%81%AC%EB%A6%BD%ED%8A%B8%EB%A1%9C%20%EC%83%9D%EC%84%B1%ED%95%9C%20%ED%94%8C%EB%A1%AF%EC%97%90%EC%84%9C%20X%20%EB%B0%8F%20Y%EC%B6%95%EC%9C%BC%EB%A1%9C%2025%20%EA%B0%84%EA%B2%A9%EC%9D%84%20%EB%91%94%20%EC%82%AC%EC%9A%A9%EC%9E%90%20%EC%A7%80%EC%A0%95%20%EA%B7%B8%EB%A6%AC%EB%93%9C%EB%A5%BC%20%EC%96%B4%EB%96%BB%EA%B2%8C%20%EB%A7%8C%EB%93%A4%EA%B3%A0(%EA%B7%B8%EB%A6%AC%EA%B3%A0%20%EC%84%A0%ED%83%9D%ED%95%9C%20%EC%83%89%EC%9C%BC%EB%A1%9C%20%EA%B7%B8%EB%A6%AC%EB%93%9C%20%EC%84%A0%EC%9D%84%20%EC%B9%A0%ED%95%98%EA%B3%A0%20%EA%B7%B8%EB%A6%AC%EB%93%9C%20%EC%84%A0%EC%9D%98%20%EC%84%A0%20%EB%84%88%EB%B9%84%EB%A5%BC%20%EB%8A%98%EB%A6%AC%EA%B3%A0)%20%EC%9E%88%EB%82%98%EC%9A%94%3F%3C%2FP%3E%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3ENames%20Default%20To%20Here(%201%20)%3B%0Adt%20%3D%20Open(%20%22%24SAMPLE_DATA%2FLittle%20Pond.jmp%22%20)%3B%0Adt%20%26lt%3B%26lt%3B%20Contour%20Plot(%0A%09X(%20%3AX%2C%20%3AY%20)%2C%0A%09Y(%20%3AZ%20)%2C%0A%09Show%20Data%20Points(%200%20)%2C%0A%09Fill%20Areas(%200%20)%2C%0A%09Label%20Contours(%200%20)%2C%0A%09Transform(%20%22Range%20Normalized%22%20)%2C%0A%09Specify%20Contours(%20Min(%20-4%20)%2C%20Max(%208%20)%2C%20N(%207%20)%20)%2C%0A%09SendToReport(%0A%09%09Dispatch(%0A%09%09%09%7B%7D%2C%0A%09%09%09%221%22%2C%0A%09%09%09ScaleBox%2C%0A%09%09%09%7BLabel%20Row(%20%7BShow%20Major%20Grid(%201%20)%2C%20Show%20Minor%20Grid(%201%20)%7D%20)%7D%0A%09%09)%2C%0A%09%09Dispatch(%0A%09%09%09%7B%7D%2C%0A%09%09%09%222%22%2C%0A%09%09%09ScaleBox%2C%0A%09%09%09%7BLabel%20Row(%20%7BShow%20Major%20Grid(%201%20)%2C%20Show%20Minor%20Grid(%201%20)%7D%20)%7D%0A%09%09)%0A%09)%0A)%3B%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%EC%83%9D%EC%84%B1%EB%90%9C%20%EC%B0%A8%ED%8A%B8%EB%A5%BC%20%EB%A7%88%EC%9A%B0%EC%8A%A4%20%EC%98%A4%EB%A5%B8%EC%AA%BD%20%EB%B2%84%ED%8A%BC%EC%9C%BC%EB%A1%9C%20%ED%81%B4%EB%A6%AD%ED%95%98%EA%B3%A0%20%EC%82%AC%EC%9A%A9%EC%9E%90%20%EC%A0%95%EC%9D%98%20%EC%98%B5%EC%85%98%EC%9D%84%20%EC%82%B4%ED%8E%B4%EB%B4%90%EB%8F%84%20%EC%9B%90%ED%95%98%EB%8A%94%20%EC%98%B5%EC%85%98%EC%9D%B4%20%EB%82%98%EC%98%A4%EC%A7%80%20%EC%95%8A%EC%8A%B5%EB%8B%88%EB%8B%A4.%3C%2FP%3E%3CP%3E%EA%B0%90%EC%82%AC%ED%95%B4%EC%9A%94.%3C%2FP%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-843899%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CLINGO-LABEL%3E%EC%9E%90%EB%8F%99%ED%99%94%20%EB%B0%8F%20%EC%8A%A4%ED%81%AC%EB%A6%BD%ED%8C%85%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3E%EA%B8%B0%EB%B3%B8%20%EB%8D%B0%EC%9D%B4%ED%84%B0%20%EB%B6%84%EC%84%9D%20%EB%B0%8F%20%EB%AA%A8%EB%8D%B8%EB%A7%81%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-843919%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20%ED%94%8C%EB%A1%AF%EC%97%90%EC%84%9C%20%EC%82%AC%EC%9A%A9%EC%9E%90%20%EC%A0%95%EC%9D%98%20XY%20%EA%B7%B8%EB%A6%AC%EB%93%9C%20%EA%B0%84%EA%B2%A9%EC%9D%84%20%EA%B0%96%EB%8A%94%20%EB%B0%A9%EB%B2%95%EC%9D%80%20%EB%AC%B4%EC%97%87%EC%9E%85%EB%8B%88%EA%B9%8C%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-843919%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%EA%B7%B8%EB%A6%AC%EB%93%9C%20%EC%84%A0%EC%9D%98%20%EB%84%88%EB%B9%84%EB%A5%BC%20%EC%A1%B0%EC%A0%95%ED%95%98%EB%8A%94%20%EA%B2%83%EC%9D%84%20%EC%A0%9C%EC%99%B8%ED%95%98%EA%B3%A0%20%EC%9B%90%ED%95%98%EB%8A%94%20%EB%AA%A8%EB%93%A0%20%EC%9E%91%EC%97%85%EC%9D%84%20%EC%88%98%ED%96%89%ED%95%98%EB%8A%94%20%EC%88%98%EC%A0%95%EB%90%9C%20%EC%8A%A4%ED%81%AC%EB%A6%BD%ED%8A%B8%EB%8A%94%20%EB%8B%A4%EC%9D%8C%EA%B3%BC%20%EA%B0%99%EC%8A%B5%EB%8B%88%EB%8B%A4.%3C%2FP%3E%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3ENames%20Default%20To%20Here(%201%20)%3B%0Adt%20%3D%20Open(%20%22%24SAMPLE_DATA%2FLittle%20Pond.jmp%22%20)%3B%0Acont_plot%20%3D%20dt%20%26lt%3B%26lt%3B%20Contour%20Plot(%0A%09X(%20%3AX%2C%20%3AY%20)%2C%0A%09Y(%20%3AZ%20)%2C%0A%09Show%20Data%20Points(%200%20)%2C%0A%09Fill%20Areas(%200%20)%2C%0A%09Label%20Contours(%200%20)%2C%0A%09Transform(%20%22Range%20Normalized%22%20)%2C%0A%09Specify%20Contours(%20Min(%20-4%20)%2C%20Max(%208%20)%2C%20N(%207%20)%20)%2C%0A)%3B%0Areport(cont_plot)%5Baxis%20box(1)%5D%26lt%3B%26lt%3B%20show%20major%20grid(1)%3B%0Areport(cont_plot)%5Baxis%20box(2)%5D%26lt%3B%26lt%3B%20show%20major%20grid(1)%3B%0Areport(cont_plot)%5Baxis%20box(1)%5D%26lt%3B%26lt%3B%20inc(25)%3B%0Areport(cont_plot)%5Baxis%20box(2)%5D%26lt%3B%26lt%3B%20inc(25)%3B%0A%0Areport(cont_plot)%5Baxis%20box(1)%5D%26lt%3B%26lt%3B%20Major%20Grid%20Line%20Color(%22red%22)%3B%0Areport(cont_plot)%5Baxis%20box(2)%5D%26lt%3B%26lt%3B%20Major%20Grid%20Line%20Color(%22red%22)%3B%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%EC%B6%95%20%EA%B7%B8%EB%A6%AC%EB%93%9C%EC%84%A0%EC%9D%98%20%EB%91%90%EA%BB%98%EB%A5%BC%20%EC%A1%B0%EC%A0%95%ED%95%A0%20%EB%B0%A9%EB%B2%95%EC%9D%B4%20%EB%B3%B4%EC%9D%B4%EC%A7%80%20%EC%95%8A%EC%8A%B5%EB%8B%88%EB%8B%A4.%20%EC%9D%B4%EB%A5%BC%20%EC%9C%84%ED%95%9C%20%ED%95%9C%20%EA%B0%80%EC%A7%80%20%EB%B0%A9%EB%B2%95%EC%9D%80%20%EA%B7%B8%EB%A6%AC%EB%93%9C%EC%84%A0%20%EC%88%98%EC%A4%80%EC%97%90%20%EC%B0%B8%EC%A1%B0%EC%84%A0%EC%9D%84%20%EC%B6%94%EA%B0%80%ED%95%98%EB%8A%94%20%EA%B2%83%EC%9E%85%EB%8B%88%EB%8B%A4.%3C%2FP%3E%3CBR%20%2F%3E%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3ENames%20Default%20To%20Here(%201%20)%3B%0Adt%20%3D%20Open(%20%22%24SAMPLE_DATA%2FLittle%20Pond.jmp%22%20)%3B%0Acont_plot%20%3D%20dt%20%26lt%3B%26lt%3B%20Contour%20Plot(%0A%09X(%20%3AX%2C%20%3AY%20)%2C%0A%09Y(%20%3AZ%20)%2C%0A%09Show%20Data%20Points(%200%20)%2C%0A%09Fill%20Areas(%200%20)%2C%0A%09Label%20Contours(%200%20)%2C%0A%09Transform(%20%22Range%20Normalized%22%20)%2C%0A%09Specify%20Contours(%20Min(%20-4%20)%2C%20Max(%208%20)%2C%20N(%207%20)%20)%2C%0A)%3B%0Afor%20each(%7Bval%7D%2C%200%3A%3A400%3A%3A25%2C%20%0A%09report(cont_plot)%5Baxis%20box(2)%5D%26lt%3B%3CADD%20ref%3D%22%22%20line%3D%22%22%3E%3C%2FADD%3E%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FLINGO-BODY%3E
Choose Language Hide Translation Bar
Neo
Neo
Level VI

How to have custom X-Y grid spacing in a plot?

In the plot generated by the example script below, how do I have a custom grid say spaced 25 apart on both X & Y axis (and color the grid lines with a chosen color and increase line width of the grid lines)?

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Little Pond.jmp" );
dt << Contour Plot(
	X( :X, :Y ),
	Y( :Z ),
	Show Data Points( 0 ),
	Fill Areas( 0 ),
	Label Contours( 0 ),
	Transform( "Range Normalized" ),
	Specify Contours( Min( -4 ), Max( 8 ), N( 7 ) ),
	SendToReport(
		Dispatch(
			{},
			"1",
			ScaleBox,
			{Label Row( {Show Major Grid( 1 ), Show Minor Grid( 1 )} )}
		),
		Dispatch(
			{},
			"2",
			ScaleBox,
			{Label Row( {Show Major Grid( 1 ), Show Minor Grid( 1 )} )}
		)
	)
);

Right clicking on the generated chart and looking at the customize option does not give me desired options. 

Thanks.

 

When it's too good to be true, it's neither
1 ACCEPTED SOLUTION

Accepted Solutions
MathStatChem
Level VII

Re: How to have custom X-Y grid spacing in a plot?

Here is a modified script that does everything you want, except the adjusting the width of the grid lines

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Little Pond.jmp" );
cont_plot = dt << Contour Plot(
	X( :X, :Y ),
	Y( :Z ),
	Show Data Points( 0 ),
	Fill Areas( 0 ),
	Label Contours( 0 ),
	Transform( "Range Normalized" ),
	Specify Contours( Min( -4 ), Max( 8 ), N( 7 ) ),
);
report(cont_plot)[axis box(1)]<< show major grid(1);
report(cont_plot)[axis box(2)]<< show major grid(1);
report(cont_plot)[axis box(1)]<< inc(25);
report(cont_plot)[axis box(2)]<< inc(25);

report(cont_plot)[axis box(1)]<< Major Grid Line Color("red");
report(cont_plot)[axis box(2)]<< Major Grid Line Color("red");

I cannot see a way to adjust the thickness of the axis gridlines.  One hack to do this would be to add reference lines  the grid line levels.  

 

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Little Pond.jmp" );
cont_plot = dt << Contour Plot(
	X( :X, :Y ),
	Y( :Z ),
	Show Data Points( 0 ),
	Fill Areas( 0 ),
	Label Contours( 0 ),
	Transform( "Range Normalized" ),
	Specify Contours( Min( -4 ), Max( 8 ), N( 7 ) ),
);
for each({val}, 0::400::25, 
	report(cont_plot)[axis box(2)]<<Add Ref Line(val, "Solid", red, "", 3)
);
for each({val}, 0::150::25,
	report(cont_plot)[axis box(1)]<<Add Ref Line(val, "Solid", red, "", 3)
);

View solution in original post

1 REPLY 1
MathStatChem
Level VII

Re: How to have custom X-Y grid spacing in a plot?

Here is a modified script that does everything you want, except the adjusting the width of the grid lines

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Little Pond.jmp" );
cont_plot = dt << Contour Plot(
	X( :X, :Y ),
	Y( :Z ),
	Show Data Points( 0 ),
	Fill Areas( 0 ),
	Label Contours( 0 ),
	Transform( "Range Normalized" ),
	Specify Contours( Min( -4 ), Max( 8 ), N( 7 ) ),
);
report(cont_plot)[axis box(1)]<< show major grid(1);
report(cont_plot)[axis box(2)]<< show major grid(1);
report(cont_plot)[axis box(1)]<< inc(25);
report(cont_plot)[axis box(2)]<< inc(25);

report(cont_plot)[axis box(1)]<< Major Grid Line Color("red");
report(cont_plot)[axis box(2)]<< Major Grid Line Color("red");

I cannot see a way to adjust the thickness of the axis gridlines.  One hack to do this would be to add reference lines  the grid line levels.  

 

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Little Pond.jmp" );
cont_plot = dt << Contour Plot(
	X( :X, :Y ),
	Y( :Z ),
	Show Data Points( 0 ),
	Fill Areas( 0 ),
	Label Contours( 0 ),
	Transform( "Range Normalized" ),
	Specify Contours( Min( -4 ), Max( 8 ), N( 7 ) ),
);
for each({val}, 0::400::25, 
	report(cont_plot)[axis box(2)]<<Add Ref Line(val, "Solid", red, "", 3)
);
for each({val}, 0::150::25,
	report(cont_plot)[axis box(1)]<<Add Ref Line(val, "Solid", red, "", 3)
);

Recommended Articles