<?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: Customise value colours in columns in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Customise-value-colours-in-columns/m-p/213305#M42676</link>
    <description>&lt;P&gt;Something like this, perhaps?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;NamesDefaultToHere(1);

// Make a table with defect counts
dt = NewTable("Defects", NewColumn("Rejects", Numeric, Ordinal, Formula(RandomInteger(0, 5))));
dt &amp;lt;&amp;lt; addRows(30);
dt &amp;lt;&amp;lt; runFormulas;
// Set some default colours . . .
dt:Rejects &amp;lt;&amp;lt; Set Property( "Value Colors", Color Theme( "Jet" ) );
// Make a graph
gb = dt &amp;lt;&amp;lt; Graph Builder(
				Size( 529, 447 ),
				Show Control Panel( 0 ),
				Variables( X( :Rejects ), Color( :Rejects ) ),
				Elements( Bar( X, Legend( 5 ) ) )
			);
// Get the default colors
defaultColours = dt:Rejects &amp;lt;&amp;lt; getProperty("Value Colors");
// Update the colour for 0 defects
Wait(2);
defaultColours[1] = Expr(0 = 32);
// Renistate updated colours
dt:Rejects &amp;lt;&amp;lt; Set Property( "Value Colors", defaultColours);&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 17 Jun 2019 11:33:15 GMT</pubDate>
    <dc:creator>ian_jmp</dc:creator>
    <dc:date>2019-06-17T11:33:15Z</dc:date>
    <item>
      <title>Customise value colours in columns</title>
      <link>https://community.jmp.com/t5/Discussions/Customise-value-colours-in-columns/m-p/213272#M42673</link>
      <description>&lt;P&gt;I have a numeric column called Rejects which is set to be nominal. Most of the values are zero but there are also a range of values from 1 to N (N being variable depending on the dataset). I use these to plot a map of reject locations with the number of rejects indicated by colour.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like take advantage of the JMP built-in chromatic colour themes but with any value of 0 shown in light grey (so it's easy to see where there are rejects). However, I can't do both.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt:Rejects &amp;lt;&amp;lt; Set Property( "Value Colors", Color Theme( "Jet" ) );
dt:Rejects &amp;lt;&amp;lt; Set Property( "Value Colors", {0 = 32} );&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;but the second command overrides the first and sets the color theme back to the default. I can do it interactively by setting the colour theme then clicking on the colour for 0 in the column properties dialog but I want to script it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I could change the default catagorical colour threme to be Jet, but I don't want to rely on that, and I also just other colour themes elsewhere in my reports. I also don't want to hardcode the colours because I want to use the full range of colours (blue to red) whether N is 5 or 25.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks for your help,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Matthew.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Jun 2019 08:58:06 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Customise-value-colours-in-columns/m-p/213272#M42673</guid>
      <dc:creator>matth1</dc:creator>
      <dc:date>2019-06-17T08:58:06Z</dc:date>
    </item>
    <item>
      <title>Re: Customise value colours in columns</title>
      <link>https://community.jmp.com/t5/Discussions/Customise-value-colours-in-columns/m-p/213305#M42676</link>
      <description>&lt;P&gt;Something like this, perhaps?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;NamesDefaultToHere(1);

// Make a table with defect counts
dt = NewTable("Defects", NewColumn("Rejects", Numeric, Ordinal, Formula(RandomInteger(0, 5))));
dt &amp;lt;&amp;lt; addRows(30);
dt &amp;lt;&amp;lt; runFormulas;
// Set some default colours . . .
dt:Rejects &amp;lt;&amp;lt; Set Property( "Value Colors", Color Theme( "Jet" ) );
// Make a graph
gb = dt &amp;lt;&amp;lt; Graph Builder(
				Size( 529, 447 ),
				Show Control Panel( 0 ),
				Variables( X( :Rejects ), Color( :Rejects ) ),
				Elements( Bar( X, Legend( 5 ) ) )
			);
// Get the default colors
defaultColours = dt:Rejects &amp;lt;&amp;lt; getProperty("Value Colors");
// Update the colour for 0 defects
Wait(2);
defaultColours[1] = Expr(0 = 32);
// Renistate updated colours
dt:Rejects &amp;lt;&amp;lt; Set Property( "Value Colors", defaultColours);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 17 Jun 2019 11:33:15 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Customise-value-colours-in-columns/m-p/213305#M42676</guid>
      <dc:creator>ian_jmp</dc:creator>
      <dc:date>2019-06-17T11:33:15Z</dc:date>
    </item>
    <item>
      <title>Re: Customise value colours in columns</title>
      <link>https://community.jmp.com/t5/Discussions/Customise-value-colours-in-columns/m-p/213399#M42687</link>
      <description>&lt;P&gt;Thanks Ian, works well!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Matthew.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Jun 2019 19:14:40 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Customise-value-colours-in-columns/m-p/213399#M42687</guid>
      <dc:creator>matth1</dc:creator>
      <dc:date>2019-06-17T19:14:40Z</dc:date>
    </item>
  </channel>
</rss>

