<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic How to have custom X-Y grid spacing in a plot? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-to-have-custom-X-Y-grid-spacing-in-a-plot/m-p/843899#M101765</link>
    <description>&lt;P&gt;In the plot generated by the example script below, how do I have a custom grid say spaced 25 apart on both X &amp;amp; Y axis (and color the grid lines with a chosen color and increase line width of the grid lines)?&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Little Pond.jmp" );
dt &amp;lt;&amp;lt; 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 )} )}
		)
	)
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Right clicking on the generated chart and looking at the customize option does not give me desired options.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 24 Feb 2025 13:42:28 GMT</pubDate>
    <dc:creator>Neo</dc:creator>
    <dc:date>2025-02-24T13:42:28Z</dc:date>
    <item>
      <title>How to have custom X-Y grid spacing in a plot?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-have-custom-X-Y-grid-spacing-in-a-plot/m-p/843899#M101765</link>
      <description>&lt;P&gt;In the plot generated by the example script below, how do I have a custom grid say spaced 25 apart on both X &amp;amp; Y axis (and color the grid lines with a chosen color and increase line width of the grid lines)?&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Little Pond.jmp" );
dt &amp;lt;&amp;lt; 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 )} )}
		)
	)
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Right clicking on the generated chart and looking at the customize option does not give me desired options.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Feb 2025 13:42:28 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-have-custom-X-Y-grid-spacing-in-a-plot/m-p/843899#M101765</guid>
      <dc:creator>Neo</dc:creator>
      <dc:date>2025-02-24T13:42:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to have custom X-Y grid spacing in a plot?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-have-custom-X-Y-grid-spacing-in-a-plot/m-p/843919#M101766</link>
      <description>&lt;P&gt;Here is a modified script that does everything you want, except the adjusting the width of the grid lines&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Little Pond.jmp" );
cont_plot = dt &amp;lt;&amp;lt; 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)]&amp;lt;&amp;lt; show major grid(1);
report(cont_plot)[axis box(2)]&amp;lt;&amp;lt; show major grid(1);
report(cont_plot)[axis box(1)]&amp;lt;&amp;lt; inc(25);
report(cont_plot)[axis box(2)]&amp;lt;&amp;lt; inc(25);

report(cont_plot)[axis box(1)]&amp;lt;&amp;lt; Major Grid Line Color("red");
report(cont_plot)[axis box(2)]&amp;lt;&amp;lt; Major Grid Line Color("red");&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I cannot see a way to adjust the thickness of the axis gridlines. &amp;nbsp;One hack to do this would be to add reference lines &amp;nbsp;the grid line levels. &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Little Pond.jmp" );
cont_plot = dt &amp;lt;&amp;lt; 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)]&amp;lt;&amp;lt;Add Ref Line(val, "Solid", red, "", 3)
);
for each({val}, 0::150::25,
	report(cont_plot)[axis box(1)]&amp;lt;&amp;lt;Add Ref Line(val, "Solid", red, "", 3)
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 24 Feb 2025 14:20:00 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-have-custom-X-Y-grid-spacing-in-a-plot/m-p/843919#M101766</guid>
      <dc:creator>MathStatChem</dc:creator>
      <dc:date>2025-02-24T14:20:00Z</dc:date>
    </item>
  </channel>
</rss>

