<?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: Local Data Filter Arithmetics (e.g. for Graphlets) in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Local-Data-Filter-Arithmetics-e-g-for-Graphlets/m-p/525510#M74997</link>
    <description>&lt;P&gt;Ah, "Add filter" adds a new "OR" group - I missed this detail:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="HolgerSp_1-1658590589546.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/44251i37601791F4BEF4F5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="HolgerSp_1-1658590589546.png" alt="HolgerSp_1-1658590589546.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, we just need a solution to fix the miniature graph in the hover label.&lt;BR /&gt;Hm ...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 23 Jul 2022 15:45:20 GMT</pubDate>
    <dc:creator>hogi</dc:creator>
    <dc:date>2022-07-23T15:45:20Z</dc:date>
    <item>
      <title>Local Data Filter Arithmetics (e.g. for Graphlets)</title>
      <link>https://community.jmp.com/t5/Discussions/Local-Data-Filter-Arithmetics-e-g-for-Graphlets/m-p/525364#M74984</link>
      <description>&lt;P&gt;Graphlets are very cool!&lt;/P&gt;
&lt;P&gt;The local data filter is great. It automatically adjusts the data of the graphlet to match the subgroup of the main graph.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Are there JSL functions to adjust this filter?&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;I already found the&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Skip Filters() &lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;in Nascif's post&amp;nbsp;&lt;LI-MESSAGE title="Hover graphlet from another data table" uid="296005" url="https://community.jmp.com/t5/Discussions/Hover-graphlet-from-another-data-table/m-p/296005#U296005" discussion_style_icon_css="lia-mention-container-editor-message lia-img-icon-forum-thread lia-fa-icon lia-fa-forum lia-fa-thread lia-fa"&gt;&lt;/LI-MESSAGE&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It removes parts unused parts of the filter such that the filter can also work for other tables without warning messages.&lt;BR /&gt;Is there a documentation how it works in detail?&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Is there also a JSL function to add or intersect filters?&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Application case:&lt;/P&gt;
&lt;P&gt;If I generated a graph with a filter ( Bif Class plot restricted to age= 14)&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Graph Builder(
	Variables( X( :height ), Y( :weight ), Overlay( :age ) ),
	Elements( Points( X, Y, Legend( 26 ) ) ),
	Local Data Filter(
		Add Filter( columns( :age ), Where( :age == 14 ), Display( :age, N Items( 6 ) ) )
	)
)&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;and use it as a hover label (via "save Script" - "Hover Label"/"Paste Graphlet") ...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;the local data filter is still there in the JSL script:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Open( "$SAMPLE_DATA/Big Class.jmp" );
Graph Builder(
	Variables( X( :sex ) ),
	Elements( Bar( X, Legend( 3 ) ) ),
	SendToReport(
		Dispatch(
			{},
			"Graph Builder",
			FrameBox,
			{Set Graphlet(
				Picture(
					Graph Builder(
						Size( 422, 474 ),
						Show Control Panel( 0 ),
						Variables( X( :height ), Y( :weight ), Overlay( :age ) ),
						Elements( Points( X, Y, Legend( 26 ) ) ),
						Local Data Filter( Add Filter( columns( :age ), Where( :age == 14 ) ) )
					)
				)
			)}
		)
	)
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;but it's function is automatically replaced by the local data filter from the Hover Label Extension Framework (all ages visible):&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="HolgerSp_0-1658509519553.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/44246iF2A482428B45CA93/image-size/medium?v=v2&amp;amp;px=400" role="button" title="HolgerSp_0-1658509519553.png" alt="HolgerSp_0-1658509519553.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So, it would be great to have a "merge" function to combine the manual local data filter with the one from the Hover Label Extension Framework.&lt;/P&gt;</description>
      <pubDate>Sun, 11 Jun 2023 11:26:09 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Local-Data-Filter-Arithmetics-e-g-for-Graphlets/m-p/525364#M74984</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2023-06-11T11:26:09Z</dc:date>
    </item>
    <item>
      <title>Re: Local Data Filter Arithmetics (e.g. for Graphlets)</title>
      <link>https://community.jmp.com/t5/Discussions/Local-Data-Filter-Arithmetics-e-g-for-Graphlets/m-p/525390#M74987</link>
      <description>&lt;P&gt;You can script this, but it would definitely be nice to have option where the local data filters could be merged. This code can be made cleaner, but I just brute-forced it&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

dt = Open("$SAMPLE_DATA/Big Class.jmp");
gb = dt &amp;lt;&amp;lt; Graph Builder(
	Variables(X(:sex)),
	Elements(Bar(X, Legend(3))),
	SendToReport(
		Dispatch(
			{},
			"Graph Builder",
			FrameBox,
			{Set Graphlet(
				Picture(
					gb = Graph Builder(
						Size(422, 474),
						Show Control Panel(0),
						Variables(X(:height), Y(:weight), Overlay(:age)),
						Elements(Points(X, Y, Legend(26)))
					);
					Insert Into(_filters, Name Expr(:age));
					Eval(Substitute(
						Expr(
							f = gb &amp;lt;&amp;lt; Local Data Filter(Add Filter(
								columns(_col_list_), Where(_wheres_)
							))
						),
						Expr(_col_list_),
						_filters,
						Expr(_wheres_),
						Parse(_where)
					));
					f &amp;lt;&amp;lt; (Filter Column(:age) &amp;lt;&amp;lt; Where(::age == 14));
				),
			)}
		)
	)
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 22 Jul 2022 18:39:25 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Local-Data-Filter-Arithmetics-e-g-for-Graphlets/m-p/525390#M74987</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2022-07-22T18:39:25Z</dc:date>
    </item>
    <item>
      <title>Re: Local Data Filter Arithmetics (e.g. for Graphlets)</title>
      <link>https://community.jmp.com/t5/Discussions/Local-Data-Filter-Arithmetics-e-g-for-Graphlets/m-p/525478#M74994</link>
      <description>&lt;P&gt;Hi Jarmo.&lt;BR /&gt;Thanks a lot for the JSL sniplet - a lot to learn from it ...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It's interesting:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;If the Local Data Filter is created inside the Graph Builder part (my code), it's overwritten by the Local Data Filter from the Hover Label Extension Framework.&lt;/LI&gt;&lt;LI&gt;If the Local Data Filter is created after the Graph Builder (your code), it overwrites the&amp;nbsp;Local Data Filter from the Hover Label Extrension Framework. *)&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;*) Looking closer:&lt;/P&gt;&lt;P&gt;This just holds for the&amp;nbsp;graph that opens after clicking on the miniature graph in the hover label.&lt;BR /&gt;The miniature graph itself still shows all ages, so case 1)&lt;/P&gt;&lt;P&gt;-&amp;gt; surprising that&amp;nbsp;there are two distinct graphs generated. With different ways of overwriting the Local Data Filter?&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;A last question:&lt;BR /&gt;Is there a tutorial that explains the different Local Data Filter Functions.&lt;BR /&gt;e.g. why do you have to use&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;f &amp;lt;&amp;lt; (Filter Column(:age) &amp;lt;&amp;lt; Where(::age == 14));&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;an why does&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;f &amp;lt;&amp;lt; Add Filter(Columns(:age), Where(::age == 14));&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;add the same filter, but without any effect?&lt;/P&gt;</description>
      <pubDate>Sat, 23 Jul 2022 11:23:17 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Local-Data-Filter-Arithmetics-e-g-for-Graphlets/m-p/525478#M74994</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2022-07-23T11:23:17Z</dc:date>
    </item>
    <item>
      <title>Re: Local Data Filter Arithmetics (e.g. for Graphlets)</title>
      <link>https://community.jmp.com/t5/Discussions/Local-Data-Filter-Arithmetics-e-g-for-Graphlets/m-p/525479#M74995</link>
      <description>&lt;P&gt;I think the later one should also work if you modify the script otherwise (like I said, I just brute-forced to get it working). If I were to clean it up, first iteration of that would be maybe something like this where I first apply the filters from hover label and then add additional filters&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

dt = Open("$SAMPLE_DATA/Big Class.jmp");
gb = dt &amp;lt;&amp;lt; Graph Builder(
	Variables(X(:sex)),
	Elements(Bar(X, Legend(3))),
	SendToReport(
		Dispatch(
			{},
			"Graph Builder",
			FrameBox,
			{Set Graphlet(
				Picture(
					Local({gb, f},
						gb = Graph Builder(
							Size(422, 474),
							Show Control Panel(0),
							Variables(X(:height), Y(:weight), Overlay(:age)),
							Elements(Points(X, Y, Legend(26)))
						);
						Eval(EvalExpr(
							f = gb &amp;lt;&amp;lt; Local Data Filter(
								Add Filter(
									columns(expr(_filters)), Where(expr(NameExpr(_whereExpr)))
								)
							)
						));
						//f &amp;lt;&amp;lt; Conditional(1);
						f &amp;lt;&amp;lt; Grouped By And(1);
						f &amp;lt;&amp;lt; Add Filter(Columns(:age), Where(:age == 14));
						f &amp;lt;&amp;lt; Add Filter(Columns(:height), Where(:height &amp;gt;= 55));
					)
				),
			)}
		)
	)
);
Write();&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;CODE class=" language-jsl"&gt;&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 23 Jul 2022 11:37:04 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Local-Data-Filter-Arithmetics-e-g-for-Graphlets/m-p/525479#M74995</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2022-07-23T11:37:04Z</dc:date>
    </item>
    <item>
      <title>Re: Local Data Filter Arithmetics (e.g. for Graphlets)</title>
      <link>https://community.jmp.com/t5/Discussions/Local-Data-Filter-Arithmetics-e-g-for-Graphlets/m-p/525510#M74997</link>
      <description>&lt;P&gt;Ah, "Add filter" adds a new "OR" group - I missed this detail:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="HolgerSp_1-1658590589546.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/44251i37601791F4BEF4F5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="HolgerSp_1-1658590589546.png" alt="HolgerSp_1-1658590589546.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, we just need a solution to fix the miniature graph in the hover label.&lt;BR /&gt;Hm ...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 23 Jul 2022 15:45:20 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Local-Data-Filter-Arithmetics-e-g-for-Graphlets/m-p/525510#M74997</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2022-07-23T15:45:20Z</dc:date>
    </item>
    <item>
      <title>Re: Local Data Filter Arithmetics (e.g. for Graphlets)</title>
      <link>https://community.jmp.com/t5/Discussions/Local-Data-Filter-Arithmetics-e-g-for-Graphlets/m-p/525519#M74998</link>
      <description>&lt;P&gt;Might need to use additional data table for that&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

dt = Open("$SAMPLE_DATA/Big Class.jmp");
gb = dt &amp;lt;&amp;lt; Graph Builder(
	Variables(X(:sex)),
	Elements(Bar(X, Legend(3))),
	SendToReport(
		Dispatch(
			{},
			"Graph Builder",
			FrameBox,
			{Set Graphlet(
				Picture(
					If( Is Empty(dt1),
						dt1 = dt &amp;lt;&amp;lt; Subset(All Rows, Selected Columns(0), invisible);
					);
					dt1 &amp;lt;&amp;lt; Clear Row States;
					filter_expr = Expr(And());
					Insert Into(filter_expr, Name Expr(_whereExpr));
					Insert Into(filter_expr, Name Expr(:age == 14));
					Insert Into(filter_expr, Name Expr(:height &amp;gt;= 55 &amp;amp; :height &amp;lt;= 70));

					Eval(EvalExpr(dt1 &amp;lt;&amp;lt; Select Where(!filter_expr)));
					dt1 &amp;lt;&amp;lt; Hide and Exclude(1);
					gb_expr = EvalExpr(dt1 &amp;lt;&amp;lt; Graph Builder(
						Size(422, 474),
						Show Control Panel(0),
						Variables(X(:height), Y(:weight), Overlay(:age)),
						Elements(Points(X, Y, Legend(26))),
						Local Data Filter(
							Grouped by AND(1),
							Add Filter(columns(:sex), Where(Expr(NameExpr(_whereExpr)))),
							Add Filter(columns(:age), Where(:age == 14), Display(:age, N Items(6))),
							Add Filter(columns(:height), Where(:height &amp;gt;= 55 &amp;amp; :height &amp;lt;= 70))
						)
					));
					gb_expr;
				),
				Click(
					dt1 &amp;lt;&amp;lt; Clear Row States;
					gb2 = gb_expr;
					Eval(EvalExpr(gb2 &amp;lt;&amp;lt; On Close(
						Try(Close(Expr(dt1), no save));
					)));
				)
			)}
		)
	)
);
Write();&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 23 Jul 2022 17:44:29 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Local-Data-Filter-Arithmetics-e-g-for-Graphlets/m-p/525519#M74998</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2022-07-23T17:44:29Z</dc:date>
    </item>
    <item>
      <title>Re: Local Data Filter Arithmetics (e.g. for Graphlets)</title>
      <link>https://community.jmp.com/t5/Discussions/Local-Data-Filter-Arithmetics-e-g-for-Graphlets/m-p/525524#M74999</link>
      <description>&lt;P&gt;That's a solution!&lt;/P&gt;&lt;P&gt;no chance for the Hover Label Extension Framework Local Data Filter handling to escape.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 23 Jul 2022 18:22:20 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Local-Data-Filter-Arithmetics-e-g-for-Graphlets/m-p/525524#M74999</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2022-07-23T18:22:20Z</dc:date>
    </item>
  </channel>
</rss>

