<?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: Change color theme in plot legend of FIt Curve in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Change-color-theme-in-plot-legend-of-FIt-Curve/m-p/368872#M61877</link>
    <description>&lt;P&gt;Hi Nathan,&lt;/P&gt;
&lt;P&gt;You raised an intriguing question: considering that you cannot manually modify the color of the line of fit in the Fit Curve platform, I'm not aware of any elegant method to change the settings after the plot has been called like you would do in GB.&lt;/P&gt;
&lt;P&gt;Hence, I came up with a simple dirty trick: change the color theme before calling the Fit Curve platform. It is ugly but it seems to work, see below:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default to Here (1);

dt = New Table( "TEST for FIT", //DUMMY TABLE
	Add Rows( 100 ),
	New Column( "X1",
		Numeric,
		"Continuous",
		Format( "Best", 12 ),
		Set Values(
			[-1.75737689252763, -0.764592545628707, 0.0510173405612358,
			0.296947452630042, 1.07254119757705, -0.457175811296141, 2.2967706289395,
			-2.03142875936277, -0.363048769682677, -0.5070633105302,
			0.154495773405026, 0.369788925828579, 0.597166128844207,
			-1.07960670306945, -1.30872421085908, 0.130645965468011,
			-0.412897094133047, 0.9255870864491, -1.8301802424961, -1.7841388270802,
			1.09327584758963, 0.182884026871625, 0.424531175652736,
			0.0556158029054966, -0.640709634446687, 0.418565044637002,
			0.116564045292701, -2.12143236669799, -0.331469472169104,
			-1.24179988452203, 0.155735483143868, -0.00138870426949338,
			0.466001490590278, 1.36589200985638, -3.22275463841887,
			-0.800508277125038, -1.78007607611038, -1.21967208140065,
			1.30176200548787, -0.480892428153654, 0.158765967966113,
			-0.127576464285864, 0.252459427763925, -1.68598410912989,
			-0.1970956676386, 1.55034428468064, -1.22708700695268,
			-0.0605279865915366, -1.49250653248953, -0.162256456084438,
			-0.0652649037086258, 0.00797946402916947, -1.35256879313255,
			-0.652285809936282, -0.934510673918681, -1.05100651980935,
			-0.791137119509579, -0.204256037124367, 0.870279762249423,
			-0.445336826845759, 0.795010489801338, 0.0995886571396687,
			-0.416148453467265, -2.01017021764025, -1.81678701825346,
			1.69323861834956, 0.143536807692393, -0.0336633898898059,
			-1.09589423234423, 0.80081362059253, 0.934714505656128, 1.2393741198206,
			0.33824576332954, -0.292203308012728, 0.505302707503523,
			-1.00205691512905, 0.0466520972335475, 0.223145974635781,
			-0.624589588016431, 1.28323068510501, 0.50670682478464,
			0.0700531578104748, -2.50121391459843, 1.05477568536072,
			-0.0969894453114527, -3.13034948200876, -0.772134746161867,
			-1.16109167197385, 1.35393467256404, -0.232421055502557,
			-0.28636706790363, 0.434413591597962, 0.742704293993728,
			-0.646790477388557, -1.64641063868416, 1.2771435491761,
			0.639487960805282, 1.747183899193, 0.585001038344993, 0.930693565426168]
		)
	),
	New Column( "X2",
		Numeric,
		"Continuous",
		Format( "Best", 12 ),
		Set Values(
			[6.0198103129928, 7.20091205222843, 4.65070026886468, 3.17670690687595,
			5.03355092227052, 6.30151380427266, 5.24386848221495, 6.90048447961645,
			9.20918236706509, 4.41506689039341, 7.73943697235743, 4.99394902047945,
			3.65679903427308, 4.83267420173453, 6.74796638714244, 5.38200291743643,
			2.94085457642222, 6.23822904145476, 3.79435790981074, 2.98732948494231,
			7.90936901554754, 3.82084295664395, 4.93889136576797, 4.867614989468,
			6.79411638520983, 4.63770841913521, 5.72297568708847, 5.67278210743382,
			2.87898040841589, 4.77794431031051, 6.69989934770925, 4.18010020602993,
			4.28229869222054, 6.47325820610683, 5.73193412972703, 0.836060701792944,
			4.37959357272853, 4.48982482007942, 4.09977961461508, 4.96013142226247,
			6.45031157468394, 3.18557718923309, 5.28451580294059, 5.44547778148437,
			8.83919395262557, 6.08940873455808, 5.40325273508031, 5.43500364366441,
			3.07766204858337, 4.89637627661071, 6.14412510760593, -0.485587355920933,
			6.20311099333472, 5.09962057513129, 0.983662156370214, 4.56520333800937,
			3.40784971252274, 6.6538883206875, 6.00252057357039, 7.97238557914813,
			2.71015418553192, 3.96580809447913, 7.78900888660749, 4.28555518962493,
			6.01393747682294, 5.94907034495602, 9.84611706857246, 5.79850505627085,
			5.67541478004717, 4.30408910278679, 5.40321729312776, 5.85341408571007,
			4.94639447712469, 4.34708559266172, 4.73871246438279, 3.19787036834528,
			1.00957590923624, 2.47971892470545, 6.20071963231195, 6.97684170194268,
			9.22965462317164, 6.53609378001856, 5.81203830009249, 10.5481367361956,
			6.16969124017285, 4.21970045748313, 5.07606287078316, 2.52494896388046,
			8.31352516884491, 3.71846400818337, 4.02334289547053, 5.86633070726614,
			4.88813438851164, 2.8026412414906, 2.93427614698916, 4.14856696486954,
			3.65940024812031, 7.15564460250633, 4.31207256865605, 5.1138900371015]
		)
	),
	New Column( "Y",
		Numeric,
		"Continuous",
		Format( "Best", 12 ),
		Formula( :X1 + :X2 + Random Normal( 0, 0.5 ) ),
		Set Selected
	)
);

// This one the ugliest piece of script I put together but it seems to work

Show (Get Preference( Categorical Color Theme ));

Set Preference( Categorical Color Theme( "Jet" ) ); // CHANGE THE COLOR THEME BEFORE CALLING Fit Curve

Show (Get Preference( Categorical Color Theme ));

Fit Curve( Y( :Y ), X( :X1 ), Fit Linear, Fit Cubic );

Set preference (Categorical Color Theme ("JMP Default")); //RESTORES JMP Default Color Theme

Show (Get Preference( Categorical Color Theme )); &lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 18 Mar 2021 06:05:11 GMT</pubDate>
    <dc:creator>Thierry_S</dc:creator>
    <dc:date>2021-03-18T06:05:11Z</dc:date>
    <item>
      <title>Change color theme in plot legend of FIt Curve</title>
      <link>https://community.jmp.com/t5/Discussions/Change-color-theme-in-plot-legend-of-FIt-Curve/m-p/368792#M61867</link>
      <description>&lt;P&gt;I am doing a fit curve and would like to alter the color theme of the plot of grouped lines. I can't find syntax to be able to do this. I found some links to XPath work for doing something similar in graph builder ( {legend box ref }&amp;lt;&amp;lt; Categorical Color theme() ) but that doesn't seem to work in the fit curve report. Grabbing the XML, it wasn't clear if needing a different node was my issue...&lt;BR /&gt;&lt;BR /&gt;Here's my base:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Fit Curve(
	Y( :AR ),
	X( :"Spec cPL (µg/L)"n ),
	Group( :Slide Condition ),
	Fit Exponential 3P,
	Where( :AR Method == "Slope(200-350)" ),
	SendToReport(
		Dispatch( {}, "Model Comparison", OutlineBox, {Close( 1 )} ),
		Dispatch( {}, "Plot", OutlineBox, {Close( 1 )} )
	)
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I can do the command within the Fit Curve function or outside, either should work for my purposes.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 22:08:43 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Change-color-theme-in-plot-legend-of-FIt-Curve/m-p/368792#M61867</guid>
      <dc:creator>nathan-clark</dc:creator>
      <dc:date>2023-06-09T22:08:43Z</dc:date>
    </item>
    <item>
      <title>Re: Change color theme in plot legend of FIt Curve</title>
      <link>https://community.jmp.com/t5/Discussions/Change-color-theme-in-plot-legend-of-FIt-Curve/m-p/368872#M61877</link>
      <description>&lt;P&gt;Hi Nathan,&lt;/P&gt;
&lt;P&gt;You raised an intriguing question: considering that you cannot manually modify the color of the line of fit in the Fit Curve platform, I'm not aware of any elegant method to change the settings after the plot has been called like you would do in GB.&lt;/P&gt;
&lt;P&gt;Hence, I came up with a simple dirty trick: change the color theme before calling the Fit Curve platform. It is ugly but it seems to work, see below:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default to Here (1);

dt = New Table( "TEST for FIT", //DUMMY TABLE
	Add Rows( 100 ),
	New Column( "X1",
		Numeric,
		"Continuous",
		Format( "Best", 12 ),
		Set Values(
			[-1.75737689252763, -0.764592545628707, 0.0510173405612358,
			0.296947452630042, 1.07254119757705, -0.457175811296141, 2.2967706289395,
			-2.03142875936277, -0.363048769682677, -0.5070633105302,
			0.154495773405026, 0.369788925828579, 0.597166128844207,
			-1.07960670306945, -1.30872421085908, 0.130645965468011,
			-0.412897094133047, 0.9255870864491, -1.8301802424961, -1.7841388270802,
			1.09327584758963, 0.182884026871625, 0.424531175652736,
			0.0556158029054966, -0.640709634446687, 0.418565044637002,
			0.116564045292701, -2.12143236669799, -0.331469472169104,
			-1.24179988452203, 0.155735483143868, -0.00138870426949338,
			0.466001490590278, 1.36589200985638, -3.22275463841887,
			-0.800508277125038, -1.78007607611038, -1.21967208140065,
			1.30176200548787, -0.480892428153654, 0.158765967966113,
			-0.127576464285864, 0.252459427763925, -1.68598410912989,
			-0.1970956676386, 1.55034428468064, -1.22708700695268,
			-0.0605279865915366, -1.49250653248953, -0.162256456084438,
			-0.0652649037086258, 0.00797946402916947, -1.35256879313255,
			-0.652285809936282, -0.934510673918681, -1.05100651980935,
			-0.791137119509579, -0.204256037124367, 0.870279762249423,
			-0.445336826845759, 0.795010489801338, 0.0995886571396687,
			-0.416148453467265, -2.01017021764025, -1.81678701825346,
			1.69323861834956, 0.143536807692393, -0.0336633898898059,
			-1.09589423234423, 0.80081362059253, 0.934714505656128, 1.2393741198206,
			0.33824576332954, -0.292203308012728, 0.505302707503523,
			-1.00205691512905, 0.0466520972335475, 0.223145974635781,
			-0.624589588016431, 1.28323068510501, 0.50670682478464,
			0.0700531578104748, -2.50121391459843, 1.05477568536072,
			-0.0969894453114527, -3.13034948200876, -0.772134746161867,
			-1.16109167197385, 1.35393467256404, -0.232421055502557,
			-0.28636706790363, 0.434413591597962, 0.742704293993728,
			-0.646790477388557, -1.64641063868416, 1.2771435491761,
			0.639487960805282, 1.747183899193, 0.585001038344993, 0.930693565426168]
		)
	),
	New Column( "X2",
		Numeric,
		"Continuous",
		Format( "Best", 12 ),
		Set Values(
			[6.0198103129928, 7.20091205222843, 4.65070026886468, 3.17670690687595,
			5.03355092227052, 6.30151380427266, 5.24386848221495, 6.90048447961645,
			9.20918236706509, 4.41506689039341, 7.73943697235743, 4.99394902047945,
			3.65679903427308, 4.83267420173453, 6.74796638714244, 5.38200291743643,
			2.94085457642222, 6.23822904145476, 3.79435790981074, 2.98732948494231,
			7.90936901554754, 3.82084295664395, 4.93889136576797, 4.867614989468,
			6.79411638520983, 4.63770841913521, 5.72297568708847, 5.67278210743382,
			2.87898040841589, 4.77794431031051, 6.69989934770925, 4.18010020602993,
			4.28229869222054, 6.47325820610683, 5.73193412972703, 0.836060701792944,
			4.37959357272853, 4.48982482007942, 4.09977961461508, 4.96013142226247,
			6.45031157468394, 3.18557718923309, 5.28451580294059, 5.44547778148437,
			8.83919395262557, 6.08940873455808, 5.40325273508031, 5.43500364366441,
			3.07766204858337, 4.89637627661071, 6.14412510760593, -0.485587355920933,
			6.20311099333472, 5.09962057513129, 0.983662156370214, 4.56520333800937,
			3.40784971252274, 6.6538883206875, 6.00252057357039, 7.97238557914813,
			2.71015418553192, 3.96580809447913, 7.78900888660749, 4.28555518962493,
			6.01393747682294, 5.94907034495602, 9.84611706857246, 5.79850505627085,
			5.67541478004717, 4.30408910278679, 5.40321729312776, 5.85341408571007,
			4.94639447712469, 4.34708559266172, 4.73871246438279, 3.19787036834528,
			1.00957590923624, 2.47971892470545, 6.20071963231195, 6.97684170194268,
			9.22965462317164, 6.53609378001856, 5.81203830009249, 10.5481367361956,
			6.16969124017285, 4.21970045748313, 5.07606287078316, 2.52494896388046,
			8.31352516884491, 3.71846400818337, 4.02334289547053, 5.86633070726614,
			4.88813438851164, 2.8026412414906, 2.93427614698916, 4.14856696486954,
			3.65940024812031, 7.15564460250633, 4.31207256865605, 5.1138900371015]
		)
	),
	New Column( "Y",
		Numeric,
		"Continuous",
		Format( "Best", 12 ),
		Formula( :X1 + :X2 + Random Normal( 0, 0.5 ) ),
		Set Selected
	)
);

// This one the ugliest piece of script I put together but it seems to work

Show (Get Preference( Categorical Color Theme ));

Set Preference( Categorical Color Theme( "Jet" ) ); // CHANGE THE COLOR THEME BEFORE CALLING Fit Curve

Show (Get Preference( Categorical Color Theme ));

Fit Curve( Y( :Y ), X( :X1 ), Fit Linear, Fit Cubic );

Set preference (Categorical Color Theme ("JMP Default")); //RESTORES JMP Default Color Theme

Show (Get Preference( Categorical Color Theme )); &lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Mar 2021 06:05:11 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Change-color-theme-in-plot-legend-of-FIt-Curve/m-p/368872#M61877</guid>
      <dc:creator>Thierry_S</dc:creator>
      <dc:date>2021-03-18T06:05:11Z</dc:date>
    </item>
    <item>
      <title>Re: Change color theme in plot legend of FIt Curve</title>
      <link>https://community.jmp.com/t5/Discussions/Change-color-theme-in-plot-legend-of-FIt-Curve/m-p/368952#M61885</link>
      <description>&lt;P&gt;Confirming&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/11634"&gt;@Thierry_S&lt;/a&gt;&amp;nbsp;observation that you cannot interactively change the color theme. There is nothing in the message protocol either:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="color.PNG" style="width: 804px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/31346iAD28934416D8E445/image-size/large?v=v2&amp;amp;px=999" role="button" title="color.PNG" alt="color.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I searched for "color" in the objects in the Scripting Index, but Fit Curve and Nonlinear do not have any entries.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Mar 2021 11:36:29 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Change-color-theme-in-plot-legend-of-FIt-Curve/m-p/368952#M61885</guid>
      <dc:creator>Mark_Bailey</dc:creator>
      <dc:date>2021-03-18T11:36:29Z</dc:date>
    </item>
    <item>
      <title>Re: Change color theme in plot legend of FIt Curve</title>
      <link>https://community.jmp.com/t5/Discussions/Change-color-theme-in-plot-legend-of-FIt-Curve/m-p/369070#M61892</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/11634"&gt;@Thierry_S&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/5358"&gt;@Mark_Bailey&lt;/a&gt;&amp;nbsp;I'll have to play around to see if that can work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Although, I was able to change the line color in the fit curve report itself. Next to Plot is the legend and I could double click and bring up a settings window to change the color theme (I did have to do this with each legend, I could not broadcast it). Reading your response, I thought it may be because I was in JMP 16 EA, but it's the same experience if I am in JMP 15. If there is no JSL tie to that legend, that's sad, and I'll surly be adding something to the wish list - even if the additional scripting works :)&lt;/img&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="nathan-clark_0-1616078850380.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/31348iAEF36291CA8EF83A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="nathan-clark_0-1616078850380.png" alt="nathan-clark_0-1616078850380.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Mar 2021 14:57:50 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Change-color-theme-in-plot-legend-of-FIt-Curve/m-p/369070#M61892</guid>
      <dc:creator>nathan-clark</dc:creator>
      <dc:date>2021-03-18T14:57:50Z</dc:date>
    </item>
    <item>
      <title>Re: Change color theme in plot legend of FIt Curve</title>
      <link>https://community.jmp.com/t5/Discussions/Change-color-theme-in-plot-legend-of-FIt-Curve/m-p/369284#M61904</link>
      <description>&lt;P&gt;Thanks again to everyone for the help! If you are interested, here's my post on the &lt;A href="https://community.jmp.com/t5/JMP-Wish-List/Script-color-theme-change-in-plot-legend-of-Fit-Curve/idi-p/369165" target="_self"&gt;Wish List&amp;nbsp;&lt;/A&gt;The more kudos the better :)&lt;/img&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Mar 2021 20:08:07 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Change-color-theme-in-plot-legend-of-FIt-Curve/m-p/369284#M61904</guid>
      <dc:creator>nathan-clark</dc:creator>
      <dc:date>2021-03-18T20:08:07Z</dc:date>
    </item>
  </channel>
</rss>

