<?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 how to reverse color gradient in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/how-to-reverse-color-gradient/m-p/261324#M51150</link>
    <description>&lt;P&gt;Hi, recently I set property to a column in big class data table and make this column has color gradient. code is like below:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;:height&amp;lt;&amp;lt;set property( "color gradient", { "white to blue", range( colminimum(:height), colmaximum(:height) ) } );
:height&amp;lt;&amp;lt;color cell by value(1);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;it works.&lt;/P&gt;
&lt;P&gt;but after that I want to reverse the color scale, the code is like:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;:height&amp;lt;&amp;lt;set property( "color gradient", { "white to blue", range( colminimum(:height), colmaximum(:height) ), "reverse scale" } );
:height&amp;lt;&amp;lt;color cell by value(1);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;it fails.&lt;/P&gt;
&lt;P&gt;is there anyone can help you how to reverse color scale applied on a column?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 26 Apr 2020 15:31:59 GMT</pubDate>
    <dc:creator>JLX</dc:creator>
    <dc:date>2020-04-26T15:31:59Z</dc:date>
    <item>
      <title>how to reverse color gradient</title>
      <link>https://community.jmp.com/t5/Discussions/how-to-reverse-color-gradient/m-p/261324#M51150</link>
      <description>&lt;P&gt;Hi, recently I set property to a column in big class data table and make this column has color gradient. code is like below:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;:height&amp;lt;&amp;lt;set property( "color gradient", { "white to blue", range( colminimum(:height), colmaximum(:height) ) } );
:height&amp;lt;&amp;lt;color cell by value(1);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;it works.&lt;/P&gt;
&lt;P&gt;but after that I want to reverse the color scale, the code is like:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;:height&amp;lt;&amp;lt;set property( "color gradient", { "white to blue", range( colminimum(:height), colmaximum(:height) ), "reverse scale" } );
:height&amp;lt;&amp;lt;color cell by value(1);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;it fails.&lt;/P&gt;
&lt;P&gt;is there anyone can help you how to reverse color scale applied on a column?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 26 Apr 2020 15:31:59 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/how-to-reverse-color-gradient/m-p/261324#M51150</guid>
      <dc:creator>JLX</dc:creator>
      <dc:date>2020-04-26T15:31:59Z</dc:date>
    </item>
    <item>
      <title>Re: how to reverse color gradient</title>
      <link>https://community.jmp.com/t5/Discussions/how-to-reverse-color-gradient/m-p/261328#M51151</link>
      <description>Hi,&lt;BR /&gt;The command to reverse gradient is: Reverse Gradient( 1 )&lt;BR /&gt;Best regards,&lt;BR /&gt;TS</description>
      <pubDate>Sun, 26 Apr 2020 01:37:00 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/how-to-reverse-color-gradient/m-p/261328#M51151</guid>
      <dc:creator>Thierry_S</dc:creator>
      <dc:date>2020-04-26T01:37:00Z</dc:date>
    </item>
    <item>
      <title>Re: how to reverse color gradient</title>
      <link>https://community.jmp.com/t5/Discussions/how-to-reverse-color-gradient/m-p/261334#M51152</link>
      <description>&lt;P&gt;The issues are:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;The requirement for the format of the code to set the Color Gradient, requires a List within a List, and you were leaving out the internal specification of the list&amp;nbsp;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;:height &amp;lt;&amp;lt; set property(
	"color gradient",
	{"white to blue", Range( Col Minimum( :height ), Col Maximum( :height ) ), "reverse scale"}
);&lt;/CODE&gt;&lt;/PRE&gt;
&amp;nbsp;The above code is missing the list that needs to be embedded into the Range() element.&amp;nbsp; The below code corrects the required addition for the internal list specification, but it still will not work, because of the 2nd issue following below
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;:height &amp;lt;&amp;lt; set property(
	"color gradient",
	{"white to blue", Range( { Col Minimum( :height ), Col Maximum( :height ) } ), "reverse scale"}
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;/LI&gt;
&lt;LI&gt;Secondly, when JMP sees a list, let alone a list within a list, it is going to accept it for exactly for what it is, and it will not do any processing for what is in the list....thus, col min() and col max() will not be evaluated.&amp;nbsp; So something needs to be done to handle this issue.&amp;nbsp; Below are 2 ways to handle this:
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Open( "$sample_data/big class.jmp" );

Eval(
	Parse(
		Eval Insert(
			":height &amp;lt;&amp;lt; set property(
	\!"color gradient\!",
	{\!"white to blue\!", Range({^colmin(:height)^,^colmax(:height)^ }) , \!"reverse scale\!"}
);
:height &amp;lt;&amp;lt; color cell by value( 1 );"
		)
	)
);

// or

Eval(
	Substitute(
			Expr(
				:height &amp;lt;&amp;lt; set property(
					"color gradient",
					{"white to blue", Range( {__min__, __max__} ), "reverse scale"}
				);
				:height &amp;lt;&amp;lt; color cell by value( 1 );
			),
		Expr( __min__ ), Col Min( :height ),
		Expr( __max__ ), Col Max( :height )
	)
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;/LI&gt;
&lt;/OL&gt;</description>
      <pubDate>Sun, 26 Apr 2020 02:17:28 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/how-to-reverse-color-gradient/m-p/261334#M51152</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2020-04-26T02:17:28Z</dc:date>
    </item>
  </channel>
</rss>

