<?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: Alternate row shading colors in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Alternate-row-shading-colors/m-p/480399#M72481</link>
    <description>&lt;P&gt;Thanks for taking the time to include an example. This is just what I was looking for, still new to JSL coding.&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;Craig.&lt;/P&gt;</description>
    <pubDate>Tue, 19 Apr 2022 17:47:57 GMT</pubDate>
    <dc:creator>NaiveJaguar366</dc:creator>
    <dc:date>2022-04-19T17:47:57Z</dc:date>
    <item>
      <title>Alternate row shading colors</title>
      <link>https://community.jmp.com/t5/Discussions/Alternate-row-shading-colors/m-p/479887#M72442</link>
      <description>&lt;P&gt;I have alternate row shading set to 1 in my script and the rows in my data tables are coloured in shades of greys, I would like to change the colors used, to two shades of blue. What is the best way to code this in jsl.&lt;/P&gt;</description>
      <pubDate>Sat, 10 Jun 2023 23:47:18 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Alternate-row-shading-colors/m-p/479887#M72442</guid>
      <dc:creator>NaiveJaguar366</dc:creator>
      <dc:date>2023-06-10T23:47:18Z</dc:date>
    </item>
    <item>
      <title>Re: Alternate row shading colors</title>
      <link>https://community.jmp.com/t5/Discussions/Alternate-row-shading-colors/m-p/480190#M72460</link>
      <description>&lt;P&gt;Your question is a bit sparse.&amp;nbsp; If you're asking about a TableBox() then I do believe that it's not possible to set which colors the rows are shaded, just the default grays.&amp;nbsp; If you're talking about a DataBox() (as you would get when opening a "*.jmp" file), then you can set the cell colors to whatever you'd like -- just look up "color cell" in the Scripting index.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Apr 2022 10:00:18 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Alternate-row-shading-colors/m-p/480190#M72460</guid>
      <dc:creator>ErraticAttack</dc:creator>
      <dc:date>2022-04-19T10:00:18Z</dc:date>
    </item>
    <item>
      <title>Re: Alternate row shading colors</title>
      <link>https://community.jmp.com/t5/Discussions/Alternate-row-shading-colors/m-p/480191#M72461</link>
      <description>Thanks for replying, I will look up databox solution.</description>
      <pubDate>Tue, 19 Apr 2022 10:30:53 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Alternate-row-shading-colors/m-p/480191#M72461</guid>
      <dc:creator>NaiveJaguar366</dc:creator>
      <dc:date>2022-04-19T10:30:53Z</dc:date>
    </item>
    <item>
      <title>Re: Alternate row shading colors</title>
      <link>https://community.jmp.com/t5/Discussions/Alternate-row-shading-colors/m-p/480195#M72463</link>
      <description>&lt;P&gt;This code should give you an idea how to do it for a data table.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = New Table( "Test Banding", Add Rows( 4 ),
	New Column( "Column 1", Character, "Nominal",
		Set Values( {"a", "b", "c", "d", "e"} ) ),
	New Column( "Column 2", Numeric, "Continuous", Format( "Best", 12 ),
		Set Values( [3, 2, 1, 0, -1] ) ),
	New Column( "Column 3", Numeric, "Continuous", Format( "Best", 12 ),
		Set Values( [4, 5, 6, 7, 8] ) )
);

// Create a list of every other row number
gray_rows = {};
for (i = 1, i &amp;lt;= nrows(dt), i+=2,
	insertinto(gray_rows, i);
);

// Set every other row to gray
for (i = 1, i &amp;lt;= ncols(dt), i++,
	column(dt, i) &amp;lt;&amp;lt; Color Cells( {-14803425, gray_rows} );
);
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="pmroz_0-1650368978851.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/41860iBB088CFC23D6E817/image-size/medium?v=v2&amp;amp;px=400" role="button" title="pmroz_0-1650368978851.png" alt="pmroz_0-1650368978851.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Apr 2022 11:49:47 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Alternate-row-shading-colors/m-p/480195#M72463</guid>
      <dc:creator>pmroz</dc:creator>
      <dc:date>2022-04-19T11:49:47Z</dc:date>
    </item>
    <item>
      <title>Re: Alternate row shading colors</title>
      <link>https://community.jmp.com/t5/Discussions/Alternate-row-shading-colors/m-p/480399#M72481</link>
      <description>&lt;P&gt;Thanks for taking the time to include an example. This is just what I was looking for, still new to JSL coding.&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;Craig.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Apr 2022 17:47:57 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Alternate-row-shading-colors/m-p/480399#M72481</guid>
      <dc:creator>NaiveJaguar366</dc:creator>
      <dc:date>2022-04-19T17:47:57Z</dc:date>
    </item>
    <item>
      <title>Re: Alternate row shading colors</title>
      <link>https://community.jmp.com/t5/Discussions/Alternate-row-shading-colors/m-p/917700#M107732</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I used your script to color every third row by changing it to "i+3" instead of i+2 by pure intuition and trial and error - I don't know how to script.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a table that has measurements in bunches of 3 repetitions. I'd like to shade 3 rows at a time, alternating: 3 rows grey, 3 white, 3 grey, 3 white, etc. How would such a script look like?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;thanks a LOT for your help!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;uriel&lt;/P&gt;</description>
      <pubDate>Fri, 05 Dec 2025 08:47:59 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Alternate-row-shading-colors/m-p/917700#M107732</guid>
      <dc:creator>utkcito-GMC</dc:creator>
      <dc:date>2025-12-05T08:47:59Z</dc:date>
    </item>
    <item>
      <title>Re: Alternate row shading colors</title>
      <link>https://community.jmp.com/t5/Discussions/Alternate-row-shading-colors/m-p/917725#M107736</link>
      <description>&lt;P&gt;Here's an example.&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 = New Table( "nothing", New Column( "Shaded", Set Values( 1 :: 99 ) ) );
grays = Filter Each( {v, i}, 1 :: N Row( dt ), Mod( Ceiling( i / 3 ), 2 ) );
dt:Shaded &amp;lt;&amp;lt; Color Cells( "light gray", grays );&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 05 Dec 2025 14:55:06 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Alternate-row-shading-colors/m-p/917725#M107736</guid>
      <dc:creator>mmarchandFSLR</dc:creator>
      <dc:date>2025-12-05T14:55:06Z</dc:date>
    </item>
  </channel>
</rss>

