<?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: Plotting gradient colors in JSL, how to use variables to represent specific parameters? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Plotting-gradient-colors-in-JSL-how-to-use-variables-to/m-p/697193#M88263</link>
    <description>&lt;P&gt;As an alternative you could create the matrix outside of the command and use it via &lt;FONT face="courier new,courier"&gt;Name Expr(range)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Cities.jmp" );
obj = dt &amp;lt;&amp;lt; Treemap( Categories( :city ), Sizes( :POP ), Coloring( :CO ) );

range = [1 20];
(obj &amp;lt;&amp;lt; Get Legend Server()) &amp;lt;&amp;lt; Legend Model(
	1,
	Properties(
		0,
		{gradient( Scale Values( Name Expr( range ) ) )}
	)
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Sun, 12 Nov 2023 14:26:02 GMT</pubDate>
    <dc:creator>hogi</dc:creator>
    <dc:date>2023-11-12T14:26:02Z</dc:date>
    <item>
      <title>Plotting gradient colors in JSL, how to use variables to represent specific parameters?</title>
      <link>https://community.jmp.com/t5/Discussions/Plotting-gradient-colors-in-JSL-how-to-use-variables-to/m-p/697021#M88222</link>
      <description>&lt;P&gt;For example, the maximum and minimum values of this:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;{gradient({Scale Values([200000 0 -200000])})}&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;mx=&lt;CODE class=" language-jsl"&gt;200000&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE class=" language-jsl"&gt;mn=-200000&lt;/CODE&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;{gradient({Scale Values([ma 0 -ma])})}&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;CODE class=" language-jsl"&gt;&lt;/CODE&gt;&lt;/P&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, 11 Nov 2023 12:51:52 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Plotting-gradient-colors-in-JSL-how-to-use-variables-to/m-p/697021#M88222</guid>
      <dc:creator>lala</dc:creator>
      <dc:date>2023-11-11T12:51:52Z</dc:date>
    </item>
    <item>
      <title>Re: Plotting gradient colors in JSL, how to use variables to represent specific parameters?</title>
      <link>https://community.jmp.com/t5/Discussions/Plotting-gradient-colors-in-JSL-how-to-use-variables-to/m-p/697042#M88225</link>
      <description>&lt;P&gt;This is my old school way of handling this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Cities.jmp" );
obj = dt &amp;lt;&amp;lt; Treemap( Categories( :city ), Sizes( :POP ), Coloring( :CO ) );
treemapGBPref = Get Platform Preference( treemap( "Use Graph Builder" ) );
prefVal = Arg( Arg( Arg( treemapGBPref, 1 ) ) );

mx = 20;
mn = 1;
report = obj &amp;lt;&amp;lt; report;
Eval(
	Parse(
		"report &amp;lt;&amp;lt; Dispatch(
		{},
		\!"400\!",
		ScaleBox,
		{Legend Model(
			1,
			Properties(
				0,
				{gradient( {Scale Values( ["
		 || Char( mn ) || " " || Char( mx ) || "] )} )},
				Item ID( \!"CO\!", 1 )
			)
		)}
	);"
	)
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;When all else fails, this method always works.&amp;nbsp; You need to learn it and put it into your tool box.&lt;/P&gt;</description>
      <pubDate>Sat, 11 Nov 2023 17:05:05 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Plotting-gradient-colors-in-JSL-how-to-use-variables-to/m-p/697042#M88225</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2023-11-11T17:05:05Z</dc:date>
    </item>
    <item>
      <title>Re: Plotting gradient colors in JSL, how to use variables to represent specific parameters?</title>
      <link>https://community.jmp.com/t5/Discussions/Plotting-gradient-colors-in-JSL-how-to-use-variables-to/m-p/697118#M88250</link>
      <description>&lt;P&gt;Thank Jim!&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;{gradient( {Scale Values( ["
		 || Char( mn ) || " " || Char( mx ) || "] )} )}&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 11 Nov 2023 23:54:07 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Plotting-gradient-colors-in-JSL-how-to-use-variables-to/m-p/697118#M88250</guid>
      <dc:creator>lala</dc:creator>
      <dc:date>2023-11-11T23:54:07Z</dc:date>
    </item>
    <item>
      <title>Re: Plotting gradient colors in JSL, how to use variables to represent specific parameters?</title>
      <link>https://community.jmp.com/t5/Discussions/Plotting-gradient-colors-in-JSL-how-to-use-variables-to/m-p/697193#M88263</link>
      <description>&lt;P&gt;As an alternative you could create the matrix outside of the command and use it via &lt;FONT face="courier new,courier"&gt;Name Expr(range)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Cities.jmp" );
obj = dt &amp;lt;&amp;lt; Treemap( Categories( :city ), Sizes( :POP ), Coloring( :CO ) );

range = [1 20];
(obj &amp;lt;&amp;lt; Get Legend Server()) &amp;lt;&amp;lt; Legend Model(
	1,
	Properties(
		0,
		{gradient( Scale Values( Name Expr( range ) ) )}
	)
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 12 Nov 2023 14:26:02 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Plotting-gradient-colors-in-JSL-how-to-use-variables-to/m-p/697193#M88263</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2023-11-12T14:26:02Z</dc:date>
    </item>
  </channel>
</rss>

