<?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: Create a graph using only selected rows in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Create-a-graph-using-only-selected-rows/m-p/387391#M63769</link>
    <description>&lt;P&gt;Very elegant solution and it does exactly what I need. Thank you so much!&lt;/P&gt;</description>
    <pubDate>Fri, 21 May 2021 04:26:42 GMT</pubDate>
    <dc:creator>teoten</dc:creator>
    <dc:date>2021-05-21T04:26:42Z</dc:date>
    <item>
      <title>Create a graph using only selected rows</title>
      <link>https://community.jmp.com/t5/Discussions/Create-a-graph-using-only-selected-rows/m-p/387216#M63751</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to create a Graph using Graph Builder, or via script JSL, using only selected rows, without affecting the rest of the table. The example is the following:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a table like this&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="teoten_0-1621522351482.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/32981iFF9BE9E596C6213E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="teoten_0-1621522351482.png" alt="teoten_0-1621522351482.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to create a dispersion plot of the values for category A - ONLY. I need to keep category B for some calculations, i.e. to define limits that will also be added to the plot as horizontal lines. Since I need to do it for several variables at the same time, I would prefer if you know a solution that does not requires the creation of a subset table - This would result in my script creating one new table per each variable I need to analyze. Or if you know a solution using subset table, but being able to close the new table at the end by keeping the plot actual it would work for me. I tried creating subset table with good results, but when I close it the values disappear, and I don't want to end up with several tables open or hidden.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried also by hiding and excluding all the rows containing B before running the graph builder, the result is good, but then later when I clear the row statements all the values simply appear again in the graphic. I need to keep values with B without hiding and excluding because I also want to add a boxplot comparing each group (A and B).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any ideas are welcome!&lt;/P&gt;</description>
      <pubDate>Sun, 11 Jun 2023 11:14:07 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Create-a-graph-using-only-selected-rows/m-p/387216#M63751</guid>
      <dc:creator>teoten</dc:creator>
      <dc:date>2023-06-11T11:14:07Z</dc:date>
    </item>
    <item>
      <title>Re: Create a graph using only selected rows</title>
      <link>https://community.jmp.com/t5/Discussions/Create-a-graph-using-only-selected-rows/m-p/387250#M63756</link>
      <description>&lt;P&gt;Here is a simple example, using your Example data that creates a graph with a Local Data Filter selecting only the A group data, and then hides the data filter from the display&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="filter.PNG" style="width: 409px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/32982iB865C3773AFA5E3F/image-size/large?v=v2&amp;amp;px=999" role="button" title="filter.PNG" alt="filter.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = New Table( "Example",
	Add Rows( 8 ),
	New Column( "ID", Numeric, "Continuous", Format( "Best", 12 ), Set Values( [1, 2, 3, 4, 5, 6, 7, 8] ) ),
	New Column( "Values",
		Numeric,
		"Continuous",
		Format( "Best", 12 ),
		Set Values( [1.1, 1.2, 1.3, 1.4, 1, 0.9, 0.8, 1.2] )
	),
	New Column( "Category", Character, "Nominal", Set Values( {"A", "A", "A", "A", "B", "B", "B", "B"} ) )
);


// Here is the graph code
biv =dt &amp;lt;&amp;lt; Bivariate(
	Y( :Values ),
	X( :ID ),
	Local Data Filter(
		Close Outline( 1 ),
		Add Filter( columns( :Category ), Where( :Category == "A" ) )
	)
);

// Add this line if you do not want the collapsed Local Data Filter displayed
(report(biv)&amp;lt;&amp;lt;top parent)["Local Data Filter"]&amp;lt;&amp;lt;visibility("Collapse");&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;This should give you a good start&lt;/P&gt;</description>
      <pubDate>Thu, 20 May 2021 16:10:16 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Create-a-graph-using-only-selected-rows/m-p/387250#M63756</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2021-05-20T16:10:16Z</dc:date>
    </item>
    <item>
      <title>Re: Create a graph using only selected rows</title>
      <link>https://community.jmp.com/t5/Discussions/Create-a-graph-using-only-selected-rows/m-p/387391#M63769</link>
      <description>&lt;P&gt;Very elegant solution and it does exactly what I need. Thank you so much!&lt;/P&gt;</description>
      <pubDate>Fri, 21 May 2021 04:26:42 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Create-a-graph-using-only-selected-rows/m-p/387391#M63769</guid>
      <dc:creator>teoten</dc:creator>
      <dc:date>2021-05-21T04:26:42Z</dc:date>
    </item>
    <item>
      <title>Re: Create a graph using only selected rows</title>
      <link>https://community.jmp.com/t5/Discussions/Create-a-graph-using-only-selected-rows/m-p/603538#M80666</link>
      <description>&lt;P&gt;&amp;nbsp;I posted because I had a similar question... but I decided it was better to start a new thread. Mods, feel free to delete this post if it's possible.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Feb 2023 04:55:09 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Create-a-graph-using-only-selected-rows/m-p/603538#M80666</guid>
      <dc:creator>Deez_Data</dc:creator>
      <dc:date>2023-02-22T04:55:09Z</dc:date>
    </item>
    <item>
      <title>Re: Create a graph using only selected rows</title>
      <link>https://community.jmp.com/t5/Discussions/Create-a-graph-using-only-selected-rows/m-p/603551#M80668</link>
      <description>&lt;P&gt;You can do what you want quite easily.&lt;/P&gt;
&lt;P&gt;Here is an example using the Big Class sample data table.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="txnelson_0-1677040414449.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/50323iB9459012A1B55640/image-size/medium?v=v2&amp;amp;px=400" role="button" title="txnelson_0-1677040414449.png" alt="txnelson_0-1677040414449.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;To generate the above graph&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Open the Sample data table, Big Class&lt;/LI&gt;
&lt;LI&gt;Open Graph Builder&lt;/LI&gt;
&lt;LI&gt;To compare 12 year olds to all of the individuals one just needs to create a virtual column where only the weights for 12 year olds are populated
&lt;OL&gt;
&lt;LI&gt;Right click on the weight column and select "Formula"&lt;/LI&gt;
&lt;LI&gt;When the formula dialog box opens, Right click on the new virtual column "Transform(weight)" and select "Rename"&lt;/LI&gt;
&lt;LI&gt;Rename the column to "Age 12 Weights"&lt;/LI&gt;
&lt;LI&gt;Now go to the actual formula and input the following formula
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;If( :age == 12, :weight, . )&lt;/CODE&gt;&lt;/PRE&gt;
&lt;/LI&gt;
&lt;LI&gt;Click OK&lt;/LI&gt;
&lt;/OL&gt;
&lt;/LI&gt;
&lt;LI&gt;In the Graph Builder window,&amp;nbsp;
&lt;OL&gt;
&lt;LI&gt;Drag both columns weight and Age 12 Weights to the Y axis drop area&lt;/LI&gt;
&lt;LI&gt;Right Click on the graph and select&amp;nbsp; &amp;nbsp; &amp;nbsp; Points=&amp;gt;Change to=&amp;gt;Box Plot&lt;/LI&gt;
&lt;/OL&gt;
&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;The above plot will then be produced&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Feb 2023 04:46:05 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Create-a-graph-using-only-selected-rows/m-p/603551#M80668</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2023-02-22T04:46:05Z</dc:date>
    </item>
  </channel>
</rss>

