<?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 Re: Range slider to control axis range of graph in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Range-slider-to-control-axis-range-of-graph/m-p/42177#M24575</link>
    <description>&lt;P&gt;The easiest way to do this would be to open a Global Data Filter and select the X axis variable as the filter variable. &amp;nbsp;It will set up a slider that will allow you to change the range.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA\big class.jmp" );
dt:age &amp;lt;&amp;lt; modeling type( "continuous" );
gb1 = dt &amp;lt;&amp;lt; Graph Builder(
	Size( 528, 448 ),
	Show Control Panel( 0 ),
	Variables( X( :age ), Y( :height ) ),
	Elements( Points( X, Y, Legend( 5 ) ) )
);
gb2 = dt &amp;lt;&amp;lt; Graph Builder(
	Size( 528, 448 ),
	Show Control Panel( 0 ),
	Variables( X( :age ), Y( :weight ) ),
	Elements( Points( X, Y, Legend( 5 ) ) )
);

dt &amp;lt;&amp;lt; Data Filter(
	Location( {780, 189} ),
	Mode( Show( 1 ), Include( 1 ) ),
	Add Filter( columns( :age ) )
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If you want to develop your you can setup a Slider Box to change the Min and Max values of the you can setup something like this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA\big class.jmp" );
dt:age &amp;lt;&amp;lt; modeling type( "continuous" );
gb1 = dt &amp;lt;&amp;lt; Graph Builder(
	Size( 528, 448 ),
	Show Control Panel( 0 ),
	Variables( X( :age ), Y( :height ) ),
	Elements( Points( X, Y, Legend( 5 ) ) )
);
gb2 = dt &amp;lt;&amp;lt; Graph Builder(
	Size( 528, 448 ),
	Show Control Panel( 0 ),
	Variables( X( :age ), Y( :weight ) ),
	Elements( Points( X, Y, Legend( 5 ) ) )
);
slidervar = Report( gb1 )[axisbox( 1 )] &amp;lt;&amp;lt; get min;
slidervar2 = Report( gb1 )[axisbox( 1 )] &amp;lt;&amp;lt; get max;
New Window( "Example",
	Panel Box( "Slider Box",
		H List Box(
			sb = Slider Box(
				Report( gb1 )[axisbox( 1 )] &amp;lt;&amp;lt; get min,
				Report( gb1 )[axisbox( 1 )] &amp;lt;&amp;lt; get max,
				slidervar,
				Report( gb1 )[axisbox( 1 )] &amp;lt;&amp;lt; Min( slidervar );
				Report( gb2 )[axisbox( 1 )] &amp;lt;&amp;lt; Min( slidervar );
			),
			sb2 = Slider Box(
				Report( gb1 )[axisbox( 1 )] &amp;lt;&amp;lt; get min,
				Report( gb1 )[axisbox( 1 )] &amp;lt;&amp;lt; get max,
				slidervar2,
				Report( gb1 )[axisbox( 1 )] &amp;lt;&amp;lt; Max( slidervar2 );
				Report( gb2 )[axisbox( 1 )] &amp;lt;&amp;lt; Max( slidervar2 );
			)
		)
	)
);
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;You can also add a graphics script to each of the Graph Builders, that detects changes in the range and origin of the AxisBox(1), and then when a change is detected, copy the AxisBox(1) settings from the graph where the change is detected, to each of the other graphs. &amp;nbsp;Obviously, this is more complex, however, it does have the advantage of not having to have a separate window with a slider in it.&lt;/P&gt;</description>
    <pubDate>Wed, 19 Jul 2017 20:36:06 GMT</pubDate>
    <dc:creator>txnelson</dc:creator>
    <dc:date>2017-07-19T20:36:06Z</dc:date>
    <item>
      <title>Range slider to control axis range of graph</title>
      <link>https://community.jmp.com/t5/Discussions/Range-slider-to-control-axis-range-of-graph/m-p/42172#M24571</link>
      <description>&lt;P&gt;A loop generates several graph builders with no particular name. I wanted to make a range slider to allow me to change the X axis range of ALL graphs in the journal (which all have the same range) but I'm not sure how to do that.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jul 2017 19:15:09 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Range-slider-to-control-axis-range-of-graph/m-p/42172#M24571</guid>
      <dc:creator>agonzales2021</dc:creator>
      <dc:date>2017-07-19T19:15:09Z</dc:date>
    </item>
    <item>
      <title>Re: Range slider to control axis range of graph</title>
      <link>https://community.jmp.com/t5/Discussions/Range-slider-to-control-axis-range-of-graph/m-p/42177#M24575</link>
      <description>&lt;P&gt;The easiest way to do this would be to open a Global Data Filter and select the X axis variable as the filter variable. &amp;nbsp;It will set up a slider that will allow you to change the range.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA\big class.jmp" );
dt:age &amp;lt;&amp;lt; modeling type( "continuous" );
gb1 = dt &amp;lt;&amp;lt; Graph Builder(
	Size( 528, 448 ),
	Show Control Panel( 0 ),
	Variables( X( :age ), Y( :height ) ),
	Elements( Points( X, Y, Legend( 5 ) ) )
);
gb2 = dt &amp;lt;&amp;lt; Graph Builder(
	Size( 528, 448 ),
	Show Control Panel( 0 ),
	Variables( X( :age ), Y( :weight ) ),
	Elements( Points( X, Y, Legend( 5 ) ) )
);

dt &amp;lt;&amp;lt; Data Filter(
	Location( {780, 189} ),
	Mode( Show( 1 ), Include( 1 ) ),
	Add Filter( columns( :age ) )
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If you want to develop your you can setup a Slider Box to change the Min and Max values of the you can setup something like this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA\big class.jmp" );
dt:age &amp;lt;&amp;lt; modeling type( "continuous" );
gb1 = dt &amp;lt;&amp;lt; Graph Builder(
	Size( 528, 448 ),
	Show Control Panel( 0 ),
	Variables( X( :age ), Y( :height ) ),
	Elements( Points( X, Y, Legend( 5 ) ) )
);
gb2 = dt &amp;lt;&amp;lt; Graph Builder(
	Size( 528, 448 ),
	Show Control Panel( 0 ),
	Variables( X( :age ), Y( :weight ) ),
	Elements( Points( X, Y, Legend( 5 ) ) )
);
slidervar = Report( gb1 )[axisbox( 1 )] &amp;lt;&amp;lt; get min;
slidervar2 = Report( gb1 )[axisbox( 1 )] &amp;lt;&amp;lt; get max;
New Window( "Example",
	Panel Box( "Slider Box",
		H List Box(
			sb = Slider Box(
				Report( gb1 )[axisbox( 1 )] &amp;lt;&amp;lt; get min,
				Report( gb1 )[axisbox( 1 )] &amp;lt;&amp;lt; get max,
				slidervar,
				Report( gb1 )[axisbox( 1 )] &amp;lt;&amp;lt; Min( slidervar );
				Report( gb2 )[axisbox( 1 )] &amp;lt;&amp;lt; Min( slidervar );
			),
			sb2 = Slider Box(
				Report( gb1 )[axisbox( 1 )] &amp;lt;&amp;lt; get min,
				Report( gb1 )[axisbox( 1 )] &amp;lt;&amp;lt; get max,
				slidervar2,
				Report( gb1 )[axisbox( 1 )] &amp;lt;&amp;lt; Max( slidervar2 );
				Report( gb2 )[axisbox( 1 )] &amp;lt;&amp;lt; Max( slidervar2 );
			)
		)
	)
);
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;You can also add a graphics script to each of the Graph Builders, that detects changes in the range and origin of the AxisBox(1), and then when a change is detected, copy the AxisBox(1) settings from the graph where the change is detected, to each of the other graphs. &amp;nbsp;Obviously, this is more complex, however, it does have the advantage of not having to have a separate window with a slider in it.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jul 2017 20:36:06 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Range-slider-to-control-axis-range-of-graph/m-p/42177#M24575</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2017-07-19T20:36:06Z</dc:date>
    </item>
    <item>
      <title>Re: Range slider to control axis range of graph</title>
      <link>https://community.jmp.com/t5/Discussions/Range-slider-to-control-axis-range-of-graph/m-p/42187#M24579</link>
      <description>&lt;P&gt;Jim,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but I noticed you individually named all of your graph builder objects.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As I was saying in my question, currently my program works by creating them in a loop so they are not called variable names. Because of this, I don't know how to refer to the Report.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jul 2017 21:17:01 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Range-slider-to-control-axis-range-of-graph/m-p/42187#M24579</guid>
      <dc:creator>agonzales2021</dc:creator>
      <dc:date>2017-07-19T21:17:01Z</dc:date>
    </item>
    <item>
      <title>Re: Range slider to control axis range of graph</title>
      <link>https://community.jmp.com/t5/Discussions/Range-slider-to-control-axis-range-of-graph/m-p/42188#M24580</link>
      <description>&lt;P&gt;just capture the pointer to each display object into a list, and then you can access each of them by referencing each by going back through the list.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jul 2017 21:19:22 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Range-slider-to-control-axis-range-of-graph/m-p/42188#M24580</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2017-07-19T21:19:22Z</dc:date>
    </item>
    <item>
      <title>Re: Range slider to control axis range of graph</title>
      <link>https://community.jmp.com/t5/Discussions/Range-slider-to-control-axis-range-of-graph/m-p/42189#M24581</link>
      <description>&lt;P&gt;Okay so I have a function that makes my graphs.&lt;BR /&gt;&lt;BR /&gt;You're saying make an empty list like graphslist = {};&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then in the function,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;call the graph builder some variable like a = table &amp;lt;&amp;lt; Graph builder();&lt;/P&gt;&lt;P&gt;Then insert into (graphslist, a);&lt;BR /&gt;&lt;BR /&gt;Is this what you mean?&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jul 2017 21:24:45 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Range-slider-to-control-axis-range-of-graph/m-p/42189#M24581</guid>
      <dc:creator>agonzales2021</dc:creator>
      <dc:date>2017-07-19T21:24:45Z</dc:date>
    </item>
    <item>
      <title>Re: Range slider to control axis range of graph</title>
      <link>https://community.jmp.com/t5/Discussions/Range-slider-to-control-axis-range-of-graph/m-p/42191#M24583</link>
      <description>&lt;P&gt;You got it.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jul 2017 21:26:45 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Range-slider-to-control-axis-range-of-graph/m-p/42191#M24583</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2017-07-19T21:26:45Z</dc:date>
    </item>
    <item>
      <title>Re: Range slider to control axis range of graph</title>
      <link>https://community.jmp.com/t5/Discussions/Range-slider-to-control-axis-range-of-graph/m-p/42196#M24586</link>
      <description>&lt;P&gt;Awesome! And to get it to be a range slider I did the following:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Names Default To Here( 1 );&lt;BR /&gt;dt = Open( "$SAMPLE_DATA\big class.jmp" );&lt;BR /&gt;dt:age &amp;lt;&amp;lt; modeling type( "continuous" );&lt;BR /&gt;gb1 = dt &amp;lt;&amp;lt; Graph Builder(&lt;BR /&gt;Size( 528, 448 ),&lt;BR /&gt;Show Control Panel( 0 ),&lt;BR /&gt;Variables( X( :age ), Y( :height ) ),&lt;BR /&gt;Elements( Points( X, Y, Legend( 5 ) ) )&lt;BR /&gt;);&lt;BR /&gt;gb2 = dt &amp;lt;&amp;lt; Graph Builder(&lt;BR /&gt;Size( 528, 448 ),&lt;BR /&gt;Show Control Panel( 0 ),&lt;BR /&gt;Variables( X( :age ), Y( :weight ) ),&lt;BR /&gt;Elements( Points( X, Y, Legend( 5 ) ) )&lt;BR /&gt;);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;slidervar = Report( gb1 )[axisbox( 1 )] &amp;lt;&amp;lt; get min;&lt;BR /&gt;slidervar2 = Report( gb1 )[axisbox( 1 )] &amp;lt;&amp;lt; get max;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;New Window( "Example",&lt;BR /&gt;Panel Box( "Slider Box",&lt;BR /&gt;H List Box(&lt;BR /&gt;rsb = Range Slider Box(&lt;BR /&gt;Report( gb1 )[axisbox( 1 )] &amp;lt;&amp;lt; get min, Report( gb1 )[axisbox( 1 )] &amp;lt;&amp;lt; get max, slidervar, slidervar2,&lt;BR /&gt;(&lt;BR /&gt;Report( gb1 )[axisbox( 1 )] &amp;lt;&amp;lt; Min( slidervar );&lt;BR /&gt;Report( gb1 )[axisbox( 1 )] &amp;lt;&amp;lt; Max( slidervar2 );&lt;BR /&gt;Report( gb2 )[axisbox( 1 )] &amp;lt;&amp;lt; Min( slidervar );&lt;BR /&gt;Report( gb2 )[axisbox( 1 )] &amp;lt;&amp;lt; Max( slidervar2 );&lt;BR /&gt;);&lt;BR /&gt;)&lt;BR /&gt;)&lt;BR /&gt;)&lt;BR /&gt;);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And with that I was able to do what I needed to for my own script! Jim, thank you so much!&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jul 2017 21:59:14 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Range-slider-to-control-axis-range-of-graph/m-p/42196#M24586</guid>
      <dc:creator>agonzales2021</dc:creator>
      <dc:date>2017-07-19T21:59:14Z</dc:date>
    </item>
  </channel>
</rss>

