<?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: Listbox Graphs in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Listbox-Graphs/m-p/522964#M74775</link>
    <description>&lt;P&gt;Setting it as a different page worked perfectly. Thank you!&lt;/P&gt;</description>
    <pubDate>Mon, 18 Jul 2022 19:34:50 GMT</pubDate>
    <dc:creator>trevorphysics</dc:creator>
    <dc:date>2022-07-18T19:34:50Z</dc:date>
    <item>
      <title>Listbox Graphs</title>
      <link>https://community.jmp.com/t5/Discussions/Listbox-Graphs/m-p/522882#M74763</link>
      <description>&lt;P&gt;I would like to get a listbox plot similar to the script below but with&amp;nbsp; a different data format. My data looks more like the following table where all of the data to plot is in the first two columns. I want the list portion in the list box to be test count, and when I click on a test count, it produces a plot for both forward and reverse. It looks like it may be possible with a bivariate plot using the by input... Bivariate(I1,V1,By Sweep Type, By Test Count).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is this possible and could I get some guidance on how to get this working. I am a JMP newbie and I'm not entirely sure where to start.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My Data Format&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;V1&lt;/TD&gt;&lt;TD&gt;I1&lt;/TD&gt;&lt;TD&gt;Test Count&lt;/TD&gt;&lt;TD&gt;Sweep Type&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;Forward&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;.1&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;Forward&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;.2&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;Forward&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;Reverse&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;-1&lt;/TD&gt;&lt;TD&gt;-.1&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;Reverse&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;-2&lt;/TD&gt;&lt;TD&gt;-.2&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;Reverse&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;Forward&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;.1&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;Forward&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;.2&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;Forward&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Listbox Example from sample data&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;// Listbox_Graphs.jsl
// Display one graph at a time using a listbox to select which one
names default to here(1);

dt    = open("$sample_data\CrimeData.jmp", invisible); 
xcol  = "Year";
ycols = {"Population", "Total Rate", "Violent Rate", "Property Rate", "Murder Rate",
"Rape Rate", "Robbery Rate", "Agg-Aslt Rate", "Burglary Rate", "Larceny Rate",
"MVTheft Rate", "Murder", "Rape", "Robbery", "Agg-Aslt", "Burglary", "Larceny",
"MVTheft", "Total", "Violent", "Property", "Latitude", "Longitude"};

gb_expr = {};
for(i = 1, i &amp;lt;= nitems(ycols), i++,
	ycol = ycols[i];
// Define an array of graph builder expressions, one for each y column
	one_expr = evalinsert(
"\[gb_expr[^i^] = expr(
		dt &amp;lt;&amp;lt; Graph Builder(
			Show Control Panel( 0 ),
			Variables( X( :Name( "^xcol^" ) ), Y( :Name( "^ycol^" ) ) ),
			Elements( Points( X, Y, Legend( 5 ) ), Smoother( X, Y, Legend( 6 ) ) )
		),
	);
]\");


	eval(parse(one_expr));
);

// Code to run when a different y variable is selected
y_list_expr = expr(
	y_mtx = y_lb &amp;lt;&amp;lt; get selected indices;
	y_i   = y_mtx[1];
	hlb &amp;lt;&amp;lt; delete;
	vlb &amp;lt;&amp;lt; append(
		hlb = hlistbox(
			eval(gb_expr[y_i])
		)
	);
);

gw = new window("Graphical Output",
	hlistbox(
		panel box(
			xcol || " vs:",
			y_lb = list box(ycols,
				width(250),
				nlines(20),
				max selected(1),
				y_list_expr,
			)
		),
		panel box("Graph",
			vlb = vlistbox(
				hlb = hlistbox(
					eval(gb_expr[1]),
				)
			)
		)
	)
);

y_lb &amp;lt;&amp;lt; set selected(1);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 11 Jun 2023 11:25:54 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Listbox-Graphs/m-p/522882#M74763</guid>
      <dc:creator>trevorphysics</dc:creator>
      <dc:date>2023-06-11T11:25:54Z</dc:date>
    </item>
    <item>
      <title>Re: Listbox Graphs</title>
      <link>https://community.jmp.com/t5/Discussions/Listbox-Graphs/m-p/522913#M74767</link>
      <description>&lt;P&gt;Maybe using Local Data Filter would be enough? Change Test Count modeling type to Ordinal or Nominal and then you can get something like this:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_0-1658163784582.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/44093iD75D9AB17AC1EBBB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_0-1658163784582.png" alt="jthi_0-1658163784582.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Script created by JMP:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Graph Builder(
	Size(536, 491),
	Show Control Panel(0),
	Variables(X(:V1), Y(:I1), Group X(:Test Count), Group X(:Sweep Type)),
	Elements(Points(X, Y, Legend(46)), Smoother(X, Y, Legend(47))),
	Local Data Filter(
		Add Filter(
			columns(:Test Count),
			Where(:Test Count == 1),
			Display(:Test Count, N Items(2), "List Display")
		)
	)
)&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;Edit:&lt;/P&gt;
&lt;P&gt;Script with example data table&lt;/P&gt;
&lt;LI-SPOILER&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

dt_example = New Table("Untitled",
	Add Rows(9),
	New Column("V1", Numeric, "Continuous", Format("Best", 12), Set Values([0, 1, 2, 0, -1, -2, 0, 1, 2])),
	New Column("I1", Numeric, "Continuous", Format("Best", 12), Set Values([0, 0.1, 0.2, 0, -0.1, -0.2, 0, 0.1, 0.2])),
	New Column("Test Count", Numeric, "Continuous", Format("Best", 12), Set Values([1, 1, 1, 1, 1, 1, 2, 2, 2])),
	New Column("Sweep Type",
		Character(16),
		"Nominal",
		Set Values({"Forward", "Forward", "Forward", "Reverse", "Reverse", "Reverse", "Forward", "Forward", "Forward"})
	)
);

gb = dt_example &amp;lt;&amp;lt; Graph Builder(
	Size(536, 491),
	Show Control Panel(0),
	Variables(X(:V1), Y(:I1), Group X(:Test Count), Group X(:Sweep Type)),
	Elements(Points(X, Y, Legend(46)), Smoother(X, Y, Legend(47))),
	Local Data Filter(
		Add Filter(
			columns(:Test Count),
			Modeling Type(:Test Count, Nominal),
			Display(:Test Count, N Items(2), "List Display")
		)
	)
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;/LI-SPOILER&gt;</description>
      <pubDate>Mon, 18 Jul 2022 17:06:10 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Listbox-Graphs/m-p/522913#M74767</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2022-07-18T17:06:10Z</dc:date>
    </item>
    <item>
      <title>Re: Listbox Graphs</title>
      <link>https://community.jmp.com/t5/Discussions/Listbox-Graphs/m-p/522937#M74770</link>
      <description>&lt;P&gt;This may work. Is there a way to split up the axis? The real data has a much larger range of voltages and currents&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Functionally this is a great start. Thanks for your help!&lt;/P&gt;</description>
      <pubDate>Mon, 18 Jul 2022 17:22:47 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Listbox-Graphs/m-p/522937#M74770</guid>
      <dc:creator>trevorphysics</dc:creator>
      <dc:date>2022-07-18T17:22:47Z</dc:date>
    </item>
    <item>
      <title>Re: Listbox Graphs</title>
      <link>https://community.jmp.com/t5/Discussions/Listbox-Graphs/m-p/522938#M74771</link>
      <description>&lt;DIV class=""&gt;&lt;DIV class=""&gt;Edit: Posted the comment twice. Apologies.&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 18 Jul 2022 17:31:00 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Listbox-Graphs/m-p/522938#M74771</guid>
      <dc:creator>trevorphysics</dc:creator>
      <dc:date>2022-07-18T17:31:00Z</dc:date>
    </item>
    <item>
      <title>Re: Listbox Graphs</title>
      <link>https://community.jmp.com/t5/Discussions/Listbox-Graphs/m-p/522948#M74772</link>
      <description>&lt;P&gt;I'm not sure what you mean by splitting the axis. You could possibly create new column with additional grouping and use that as other local data filter or for example as Page&lt;/P&gt;</description>
      <pubDate>Mon, 18 Jul 2022 17:46:58 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Listbox-Graphs/m-p/522948#M74772</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2022-07-18T17:46:58Z</dc:date>
    </item>
    <item>
      <title>Re: Listbox Graphs</title>
      <link>https://community.jmp.com/t5/Discussions/Listbox-Graphs/m-p/522952#M74773</link>
      <description>&lt;P&gt;You may also want to look into using the Response Screening Platform.&amp;nbsp; It generates a summary data table that has the analysis results in significance order.&amp;nbsp; Selection of the 1 or more of the parameters, and then running one of the provided Table Scripts produces the scatterplots using Fit Y by X.&amp;nbsp; Therefore, all of the analytical tests available in Fit Y by X are available to the selected parameters.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Current Data Table();

Response Screening( 
	Y( :V1, :I1 ), 
	X( :Test Count, :Sweep Type ), 
	PValues Table on Launch( 1 ) 
	);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="txnelson_0-1658166523135.png" style="width: 855px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/44096i48FAC299FB00FB64/image-dimensions/855x406?v=v2" width="855" height="406" role="button" title="txnelson_0-1658166523135.png" alt="txnelson_0-1658166523135.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Jul 2022 17:49:06 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Listbox-Graphs/m-p/522952#M74773</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2022-07-18T17:49:06Z</dc:date>
    </item>
    <item>
      <title>Re: Listbox Graphs</title>
      <link>https://community.jmp.com/t5/Discussions/Listbox-Graphs/m-p/522964#M74775</link>
      <description>&lt;P&gt;Setting it as a different page worked perfectly. Thank you!&lt;/P&gt;</description>
      <pubDate>Mon, 18 Jul 2022 19:34:50 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Listbox-Graphs/m-p/522964#M74775</guid>
      <dc:creator>trevorphysics</dc:creator>
      <dc:date>2022-07-18T19:34:50Z</dc:date>
    </item>
  </channel>
</rss>

