<?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: Need help troubleshooting graphics script: &amp;quot;Graphic script reported errors in log&amp;quot; in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Need-help-troubleshooting-graphics-script-quot-Graphic-script/m-p/942702#M109533</link>
    <description>&lt;P&gt;You can use Namespace()&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

nw = New Window("",
	Context Box(
		box:var = "",
		box:tb = Text Edit Box("AA", &amp;lt;&amp;lt;Set Function(Function({this},
			box:var = this &amp;lt;&amp;lt; get text;
		)))
	)
);

Show(Namespace(nw[EvalContextBox(2)]):var);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Change the text edit box value and run the last line again.&lt;/P&gt;</description>
    <pubDate>Sat, 18 Apr 2026 04:57:45 GMT</pubDate>
    <dc:creator>jthi</dc:creator>
    <dc:date>2026-04-18T04:57:45Z</dc:date>
    <item>
      <title>Need help troubleshooting graphics script: "Graphic script reported errors in log"</title>
      <link>https://community.jmp.com/t5/Discussions/Need-help-troubleshooting-graphics-script-quot-Graphic-script/m-p/942210#M109491</link>
      <description>&lt;P&gt;I need help understanding how to reference framebox's axis from within graphics script.&lt;/P&gt;
&lt;P&gt;Here's what I have now:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
ob_group = Outline Box( "Testing Handles: " || (dt &amp;lt;&amp;lt; Get Name) );

nw = New Window( (dt &amp;lt;&amp;lt; get name), ob_group );

GB_wHandle = Function( {dt, X_parameter, Y_Parameter, groupByColumnString},
	groupByColumn = Column( dt, groupByColumnString );
	cb = Context Box(
		box:exx = 60;
		box:exy = 60;
		box:gb = Graph Builder(
			Size( 450, 350 ),
			Ignore Platform Preferences( 1 ),
			Show Control Panel( 0 ),
			Variables( X( Column( X_Parameter ) ), Y( Column( Y_Parameter ) ), Overlay( groupByColumn ) ),
			Elements( Points( X, Y ), Smoother( X, Y ) )
		);
		box:rgb = box:gb &amp;lt;&amp;lt; Report;


		box:framebox = box:rgb &amp;lt;&amp;lt; XPATH( "//FrameBox" );

		box:axis = box:rgb &amp;lt;&amp;lt; XPATH( "//AxisBox" );
		box:axisMax = box:axis &amp;lt;&amp;lt; Get Max;
		box:axisMin = box:axis &amp;lt;&amp;lt; Get Min;
		
		{box:exx, box:exy} = box:axisMin + 10;
		
		box:framebox &amp;lt;&amp;lt; Add Graphics Script(
			"Front",
			Description( "Handle" ), 
			
			//Script start
			{Handle(
				box:exx,
				box:exy,
				box:exx = x;
				box:exy = y;
			) ; 
			box:axisMax = box:axis &amp;lt;&amp;lt; Get Max;
			box:axisMin = box:axis &amp;lt;&amp;lt; Get Min;
			Pen Color( "Red" ) ; Line( box:axisMin, {box:exx, box:exy} ) ; }
		);
	);
	Return( cb );
);

ob_group &amp;lt;&amp;lt; Append( GB_wHandle( dt, "height", "weight", "sex" ) );
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I need context box because I have multiple GBs in the same window with independent handles.&lt;/P&gt;
&lt;P&gt;Everything works until I select a point on the plot or a row in the table and exclude it.&lt;/P&gt;
&lt;P&gt;Then my graphics disappear and I get&amp;nbsp;"Graphic script reported errors in log" and "Send Expects Scriptable Object in access or evaluation of 'List' , {/*###*/DisplayBox[], DisplayBox[]}" in the log.&lt;/P&gt;
&lt;P&gt;The error happens because of the lines:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;box:axisMax = box:axis &amp;lt;&amp;lt; Get Max;
box:axisMin = box:axis &amp;lt;&amp;lt; Get Min;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If I comment them out, no errors - but then I don't get updated axis min/max in case user changes axis scale.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How can I fix it?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Apr 2026 17:24:27 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Need-help-troubleshooting-graphics-script-quot-Graphic-script/m-p/942210#M109491</guid>
      <dc:creator>miguello</dc:creator>
      <dc:date>2026-04-15T17:24:27Z</dc:date>
    </item>
    <item>
      <title>Re: Need help troubleshooting graphics script: "Graphic script reported errors in log"</title>
      <link>https://community.jmp.com/t5/Discussions/Need-help-troubleshooting-graphics-script-quot-Graphic-script/m-p/942220#M109492</link>
      <description>&lt;P&gt;This demonstrates the problem in much simpler manner&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

dt = Open("$SAMPLE_DATA/Big Class.jmp");
ob_group = Outline Box("Testing Handles: " || (dt &amp;lt;&amp;lt; Get Name));

gb = dt &amp;lt;&amp;lt; Graph Builder(
	Size(450, 350),
	Ignore Platform Preferences(1),
	Show Control Panel(0),
	Variables(X(Column("height")), Y(Column("weight")), Overlay("sex")),
	Elements(Points(X, Y), Smoother(X, Y))
);

fbs = Report(gb) &amp;lt;&amp;lt; XPATH("//FrameBox");
abs = Report(gb) &amp;lt;&amp;lt; XPATH("//AxisBox");
show(fbs, abs);

dt &amp;lt;&amp;lt; Select Rows(1) &amp;lt;&amp;lt; Hide and Exclude(1) &amp;lt;&amp;lt; Clear Select;
wait(1);

show(fbs, abs);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;When you are excluding the rows, graph builder is being recalculated and your references get deleted.&lt;/P&gt;</description>
      <pubDate>Wed, 15 Apr 2026 17:41:14 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Need-help-troubleshooting-graphics-script-quot-Graphic-script/m-p/942220#M109492</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2026-04-15T17:41:14Z</dc:date>
    </item>
    <item>
      <title>Re: Need help troubleshooting graphics script: "Graphic script reported errors in log"</title>
      <link>https://community.jmp.com/t5/Discussions/Need-help-troubleshooting-graphics-script-quot-Graphic-script/m-p/942222#M109493</link>
      <description>&lt;P&gt;One way to fix this could be to add&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;box:axis = box:rgb &amp;lt;&amp;lt; XPATH("//AxisBox");&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;to your graphic script&lt;/P&gt;</description>
      <pubDate>Wed, 15 Apr 2026 17:48:02 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Need-help-troubleshooting-graphics-script-quot-Graphic-script/m-p/942222#M109493</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2026-04-15T17:48:02Z</dc:date>
    </item>
    <item>
      <title>Re: Need help troubleshooting graphics script: "Graphic script reported errors in log"</title>
      <link>https://community.jmp.com/t5/Discussions/Need-help-troubleshooting-graphics-script-quot-Graphic-script/m-p/942236#M109495</link>
      <description>&lt;P&gt;Yep, I figured that it was re-drawing, couldn't pinpoint how to reference it.&lt;/P&gt;</description>
      <pubDate>Wed, 15 Apr 2026 19:51:26 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Need-help-troubleshooting-graphics-script-quot-Graphic-script/m-p/942236#M109495</guid>
      <dc:creator>miguello</dc:creator>
      <dc:date>2026-04-15T19:51:26Z</dc:date>
    </item>
    <item>
      <title>Re: Need help troubleshooting graphics script: "Graphic script reported errors in log"</title>
      <link>https://community.jmp.com/t5/Discussions/Need-help-troubleshooting-graphics-script-quot-Graphic-script/m-p/942237#M109496</link>
      <description>&lt;P&gt;Yep, it worked. For some reason I thought I wouldn't be able to reference report from within the script.&lt;/P&gt;</description>
      <pubDate>Wed, 15 Apr 2026 19:52:33 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Need-help-troubleshooting-graphics-script-quot-Graphic-script/m-p/942237#M109496</guid>
      <dc:creator>miguello</dc:creator>
      <dc:date>2026-04-15T19:52:33Z</dc:date>
    </item>
    <item>
      <title>Re: Need help troubleshooting graphics script: "Graphic script reported errors in log"</title>
      <link>https://community.jmp.com/t5/Discussions/Need-help-troubleshooting-graphics-script-quot-Graphic-script/m-p/942424#M109505</link>
      <description>&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/14366"&gt;@jthi&lt;/a&gt;&amp;nbsp;, one more question.&lt;BR /&gt;Let's say I want to wrap adding graphics script into a function, that would add that script to a Graph Builder.&lt;BR /&gt;This function would only need to take in a reference a Display Box then to find the corresponding Framebox and add the script.&lt;/P&gt;
&lt;P&gt;Right now in my function I have to wrap Graph Builder in Context Box, so that the elements I create (handle specifically) using&amp;nbsp; this script are independent from other ones in other Graph Builders in the same window.&lt;/P&gt;
&lt;P&gt;Question - What display box should I provide to the function to save the isolated context? In XML I see there is EvalContextBox - is this what was generated by "Context Box"?&lt;/P&gt;
&lt;P&gt;What would be the syntaxis within function? Since function is not going to have Context Box, I'll have to drop "box" namespace. How do I limit the context in this case?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Apr 2026 16:33:34 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Need-help-troubleshooting-graphics-script-quot-Graphic-script/m-p/942424#M109505</guid>
      <dc:creator>miguello</dc:creator>
      <dc:date>2026-04-16T16:33:34Z</dc:date>
    </item>
    <item>
      <title>Re: Need help troubleshooting graphics script: "Graphic script reported errors in log"</title>
      <link>https://community.jmp.com/t5/Discussions/Need-help-troubleshooting-graphics-script-quot-Graphic-script/m-p/942619#M109521</link>
      <description>&lt;P&gt;I'm a bit confused about what you wish to pass to the function, just a reference to the graph builder? Would the graph builder still be inside context box?&lt;/P&gt;</description>
      <pubDate>Fri, 17 Apr 2026 16:42:20 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Need-help-troubleshooting-graphics-script-quot-Graphic-script/m-p/942619#M109521</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2026-04-17T16:42:20Z</dc:date>
    </item>
    <item>
      <title>Re: Need help troubleshooting graphics script: "Graphic script reported errors in log"</title>
      <link>https://community.jmp.com/t5/Discussions/Need-help-troubleshooting-graphics-script-quot-Graphic-script/m-p/942655#M109526</link>
      <description>&lt;P&gt;That is one of the question I have - what SHOULD I pass to the function and if I still NEED the Context Box in this case.&lt;/P&gt;
&lt;P&gt;Right now my script is structured the following way:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;//Preparing display boxes structure and window
lub = Lineup Box( N );
ob_group = Outline Box( "Report: " || (dt &amp;lt;&amp;lt; Get Name) );
ob_group &amp;lt;&amp;lt; Append( lub );

nw = New Window( (dt &amp;lt;&amp;lt; get name), Window View("Invisible"), ob_group );&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Then I work with the data table to select what I want to plot etc., and use this function to make Context Box with Graph Builder inside, returning Context Box:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;GB_func = Function( {dt, X_parameter, Y_Parameter...}, 
	cb = Context Box(
		gb = Graph Builder(...
			//&amp;lt;graph builder code&amp;gt;
		);

		box:rgb = gb &amp;lt;&amp;lt; Report;
		//Doing some other stuff

		//Adding Graphics Script
		box:framebox = box:rgb &amp;lt;&amp;lt; XPATH( "//FrameBox" );
		box:framebox &amp;lt;&amp;lt; Add Graphics Script(...)
		
	Return( cb );
);		
		
			&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Then I take whatever columns I need to plot, and for each make those Context Boxes with Graph Builder platform inside:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;For Each( {Y_Parameter, index}, Y_Parameters,
lub &amp;lt;&amp;lt; Append( GB_func( dt, X_Parameter, Y_Parameter));
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;What I want is a function that I can pass whatever display box or reference needed for each separate Graph Builder and it would add the same graphics script that would work the same way it's working now - independent of other Graph Builders.&lt;/P&gt;
&lt;P&gt;End goal is to be able to turn the additional graphics on the plot on/off through Graph Builder Context Menu - there are use cases for both with\without graphics. Removing graphics script is not a problem AFAIK, trying to figure out how to add one in this case.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Apr 2026 18:36:43 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Need-help-troubleshooting-graphics-script-quot-Graphic-script/m-p/942655#M109526</guid>
      <dc:creator>miguello</dc:creator>
      <dc:date>2026-04-17T18:36:43Z</dc:date>
    </item>
    <item>
      <title>Re: Need help troubleshooting graphics script: "Graphic script reported errors in log"</title>
      <link>https://community.jmp.com/t5/Discussions/Need-help-troubleshooting-graphics-script-quot-Graphic-script/m-p/942657#M109527</link>
      <description>&lt;P&gt;Context Box is most likely the easiest to pass. You could also store the "global" values in some namespace which isn't box (here, window, global, named, anonymous, ...) in which case you could drop context box and pass in the graph builder reference.&lt;/P&gt;</description>
      <pubDate>Fri, 17 Apr 2026 18:53:33 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Need-help-troubleshooting-graphics-script-quot-Graphic-script/m-p/942657#M109527</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2026-04-17T18:53:33Z</dc:date>
    </item>
    <item>
      <title>Re: Need help troubleshooting graphics script: "Graphic script reported errors in log"</title>
      <link>https://community.jmp.com/t5/Discussions/Need-help-troubleshooting-graphics-script-quot-Graphic-script/m-p/942677#M109532</link>
      <description>&lt;P&gt;What is the Display Box that Context Box makes? Is it EvalContextBox? How do I say that the variables that are inside the graphics script should only be scoped within that EvalContextBox? Just use box namespace? Or there is a way to get the namespace reference associated with EvalContextBox?&lt;/P&gt;</description>
      <pubDate>Fri, 17 Apr 2026 20:44:01 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Need-help-troubleshooting-graphics-script-quot-Graphic-script/m-p/942677#M109532</guid>
      <dc:creator>miguello</dc:creator>
      <dc:date>2026-04-17T20:44:01Z</dc:date>
    </item>
    <item>
      <title>Re: Need help troubleshooting graphics script: "Graphic script reported errors in log"</title>
      <link>https://community.jmp.com/t5/Discussions/Need-help-troubleshooting-graphics-script-quot-Graphic-script/m-p/942702#M109533</link>
      <description>&lt;P&gt;You can use Namespace()&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

nw = New Window("",
	Context Box(
		box:var = "",
		box:tb = Text Edit Box("AA", &amp;lt;&amp;lt;Set Function(Function({this},
			box:var = this &amp;lt;&amp;lt; get text;
		)))
	)
);

Show(Namespace(nw[EvalContextBox(2)]):var);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Change the text edit box value and run the last line again.&lt;/P&gt;</description>
      <pubDate>Sat, 18 Apr 2026 04:57:45 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Need-help-troubleshooting-graphics-script-quot-Graphic-script/m-p/942702#M109533</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2026-04-18T04:57:45Z</dc:date>
    </item>
  </channel>
</rss>

