<?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: Filter value to grah name in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Filter-value-to-grah-name/m-p/483347#M72769</link>
    <description>&lt;P&gt;Thanks for the reply. In your example, I would like to take the graph title "height vs. age" and replace it with the selected filter "F".&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks again!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 01 May 2022 13:23:45 GMT</pubDate>
    <dc:creator>Sam619</dc:creator>
    <dc:date>2022-05-01T13:23:45Z</dc:date>
    <item>
      <title>Filter value to grah name</title>
      <link>https://community.jmp.com/t5/Discussions/Filter-value-to-grah-name/m-p/483306#M72766</link>
      <description>Hi. Can anyone please help me with a script to name my graph with the value of my filter. Thanks!</description>
      <pubDate>Fri, 09 Jun 2023 16:58:11 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Filter-value-to-grah-name/m-p/483306#M72766</guid>
      <dc:creator>Sam619</dc:creator>
      <dc:date>2023-06-09T16:58:11Z</dc:date>
    </item>
    <item>
      <title>Re: Filter value to grah name</title>
      <link>https://community.jmp.com/t5/Discussions/Filter-value-to-grah-name/m-p/483326#M72767</link>
      <description>&lt;P&gt;Could you provide more information? Which graph you want to name and how you want to name it?&lt;/P&gt;
&lt;P&gt;In general I use Group X for "naming" my graphs when I have Local Data Filter. This helps users to see how it has been filtered, especially helpful if there is lots of options.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_0-1651387612400.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/42145i23B7F0B80F162093/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_0-1651387612400.png" alt="jthi_0-1651387612400.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 01 May 2022 06:47:59 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Filter-value-to-grah-name/m-p/483326#M72767</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2022-05-01T06:47:59Z</dc:date>
    </item>
    <item>
      <title>Re: Filter value to grah name</title>
      <link>https://community.jmp.com/t5/Discussions/Filter-value-to-grah-name/m-p/483347#M72769</link>
      <description>&lt;P&gt;Thanks for the reply. In your example, I would like to take the graph title "height vs. age" and replace it with the selected filter "F".&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks again!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 01 May 2022 13:23:45 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Filter-value-to-grah-name/m-p/483347#M72769</guid>
      <dc:creator>Sam619</dc:creator>
      <dc:date>2022-05-01T13:23:45Z</dc:date>
    </item>
    <item>
      <title>Re: Filter value to grah name</title>
      <link>https://community.jmp.com/t5/Discussions/Filter-value-to-grah-name/m-p/483373#M72773</link>
      <description>&lt;P&gt;This will require scripting to my knowledge and it wasn't as simple as I thought it would be... hopefully there are easier methods to do this than the example I have here:&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(
	Size(529, 451),
	Show Control Panel(0),
	Variables(X(:age), Y(:height)),
	Elements(Points(X, Y, Legend(11))),
);

filter = gb &amp;lt;&amp;lt; Local Data Filter(Add Filter(columns(:sex), Where(:sex == "F")));
//filter = gb &amp;lt;&amp;lt; Local Data Filter(Add Filter(columns(:age), Where(:age == 12)));
f = Function({a}, 
	cur_filter_script = filter &amp;lt;&amp;lt; Get Script;
	filtered_values = Parse(Word(2, Char(Arg(Arg(Arg(cur_filter_script, 1), 2), 1)), "=="));
	If(Type(filtered_values) == "List",
		num_to_str = Transform Each({val}, filtered_values, char(val));
		title = Concat Items(num_to_str, ", ");
	,
		title = char(filtered_values);
	);
	// set title changes wrong text (outline box)
	// but &amp;lt;&amp;lt; Show Title() controls correct one
	// so we edit report layer 
	Report(gb)[TextEditBox(1)] &amp;lt;&amp;lt; Set Text(title);
);

rs = filter &amp;lt;&amp;lt; Make Filter Change Handler(f);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 01 May 2022 14:56:41 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Filter-value-to-grah-name/m-p/483373#M72773</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2022-05-01T14:56:41Z</dc:date>
    </item>
    <item>
      <title>Re: Filter value to grah name</title>
      <link>https://community.jmp.com/t5/Discussions/Filter-value-to-grah-name/m-p/483374#M72774</link>
      <description>&lt;P&gt;Awesome! Thank you. I'll give this a shot.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 01 May 2022 15:44:02 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Filter-value-to-grah-name/m-p/483374#M72774</guid>
      <dc:creator>Sam619</dc:creator>
      <dc:date>2022-05-01T15:44:02Z</dc:date>
    </item>
  </channel>
</rss>

