<?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: Graphics script reported errors in log in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Graphics-script-reported-errors-in-log/m-p/617704#M81724</link>
    <description>&lt;P&gt;Sorry, I missed the question earlier. You'll need to put the outer part, eval( evalexpr( ... ) ) around a bigger chunk of code than you showed. Something like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;split = something;
row_text = ... ;
column_text = ... ;
...
eval(evalexpr(
   ccb = dt&amp;lt;&amp;lt;controlchart(...expr(split)...expr(column_text)...expr(split)...)
))

&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;the variables, split, etc, must be set first. evalexpr will search for the expr and replace them with their values, then eval will run the finished expression.&lt;/P&gt;</description>
    <pubDate>Wed, 29 Mar 2023 09:44:27 GMT</pubDate>
    <dc:creator>Craige_Hales</dc:creator>
    <dc:date>2023-03-29T09:44:27Z</dc:date>
    <item>
      <title>Graphics script reported errors in log</title>
      <link>https://community.jmp.com/t5/Discussions/Graphics-script-reported-errors-in-log/m-p/590022#M79465</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I wrote a script to draw control charts. When I run the script all is good. However, when I open the project with the control charts there is an error on the plots "Graphics script reported errors in log".&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="PersuasionCamel_0-1673872615464.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/49117i1DD9A5C6A0BAEB42/image-size/medium?v=v2&amp;amp;px=400" role="button" title="PersuasionCamel_0-1673872615464.png" alt="PersuasionCamel_0-1673872615464.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;How can I fix the issue or hide the issue message ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you very much for your answer and have a nice day,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Jean&lt;/P&gt;</description>
      <pubDate>Thu, 08 Jun 2023 16:42:51 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Graphics-script-reported-errors-in-log/m-p/590022#M79465</guid>
      <dc:creator>PersuasionCamel</dc:creator>
      <dc:date>2023-06-08T16:42:51Z</dc:date>
    </item>
    <item>
      <title>Re: Graphics script reported errors in log</title>
      <link>https://community.jmp.com/t5/Discussions/Graphics-script-reported-errors-in-log/m-p/592039#M79615</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/45140"&gt;@PersuasionCamel&lt;/a&gt;&amp;nbsp;(intriguing name!),&lt;/P&gt;
&lt;P&gt;I am sure that someone in the community will be able to help, but I think they might need a bit more information about what you were doing. I am not sure what you mean by "the project with the control charts."&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Phil&lt;/P&gt;</description>
      <pubDate>Mon, 23 Jan 2023 10:14:22 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Graphics-script-reported-errors-in-log/m-p/592039#M79615</guid>
      <dc:creator>Phil_Kay</dc:creator>
      <dc:date>2023-01-23T10:14:22Z</dc:date>
    </item>
    <item>
      <title>Re: Graphics script reported errors in log</title>
      <link>https://community.jmp.com/t5/Discussions/Graphics-script-reported-errors-in-log/m-p/592054#M79616</link>
      <description>&lt;P&gt;Sometimes JMP graphs include some JSL scripting to draw parts of the graph. If the script has an error it prevents the rest of the graph from drawing. The error message is in the Log window, and we'd need to see it to know more, but I'd guess the script depends on a variable's value that is not available later.&lt;/P&gt;
&lt;P&gt;The message in the graph is so you don't get a completely empty graph with no hint where to look for an answer.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The usual solution to the variable-not-available problem is to use substitute() or evalexpr() to replace the variable in the script with the variable's value. Something like (untested...)&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;x = 20; y=10;
eval( evalexpr( g&amp;lt;&amp;lt;addgraphicscript( text({expr(x),expr(y)}, "hello") ) ) )&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;which results in a graphic script with hard coded 20,10 location for the hello text and no dependency on x and y later.&lt;/P&gt;</description>
      <pubDate>Mon, 23 Jan 2023 11:32:01 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Graphics-script-reported-errors-in-log/m-p/592054#M79616</guid>
      <dc:creator>Craige_Hales</dc:creator>
      <dc:date>2023-01-23T11:32:01Z</dc:date>
    </item>
    <item>
      <title>Re: Graphics script reported errors in log</title>
      <link>https://community.jmp.com/t5/Discussions/Graphics-script-reported-errors-in-log/m-p/615811#M81555</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ah yes, you are right: my problem is that in my code, I defined some values for my variables that are used to write a text and draw a line in my plots.&lt;/P&gt;&lt;P&gt;Here is a part of my code that is used to define the vertical line at "Split - 0.5" and a text at the variables "row_text" and "column_text" (written in bold and underlined). The issue is that when I open my JMP project after saving and closing it, the vertical line and the text doesn't appear.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;				Dispatch(
					{},
					"Control Chart Builder",
					FrameBox,
					{Marker Size( 4 ), Add Graphics Script( 2, Description( "" ), Text( {20, 100}, "" ) ),
					Add Graphics Script(
						3,
						Description( "" ),
						Pen Color( "black" );
						V Line( &lt;U&gt;&lt;STRONG&gt;Split&lt;/STRONG&gt;&lt;/U&gt; - 0.5 );
					), Grid Line Order( 1 ), Reference Line Order( 4 ), DispatchSeg(
						TopSeg( 1 ),
						{Set Script(
							Text( &lt;U&gt;&lt;STRONG&gt;Row_text&lt;/STRONG&gt;&lt;/U&gt;, &lt;U&gt;&lt;STRONG&gt;Column_text&lt;/STRONG&gt;&lt;/U&gt;, "Previous Period" );

						)}
					), DispatchSeg(
						TopSeg( 2 ),
						{Set Script(
							Pen Color( "black" );
							V Line( &lt;U&gt;&lt;STRONG&gt;Split&lt;/STRONG&gt; &lt;/U&gt;- 0.5 );
						)}
					)}
				)&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;How can I change the code with the "evalexpr" function to avoid the issue?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you very much and have a nice day,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Jean&lt;/P&gt;</description>
      <pubDate>Thu, 23 Mar 2023 12:22:04 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Graphics-script-reported-errors-in-log/m-p/615811#M81555</guid>
      <dc:creator>PersuasionCamel</dc:creator>
      <dc:date>2023-03-23T12:22:04Z</dc:date>
    </item>
    <item>
      <title>Re: Graphics script reported errors in log</title>
      <link>https://community.jmp.com/t5/Discussions/Graphics-script-reported-errors-in-log/m-p/617704#M81724</link>
      <description>&lt;P&gt;Sorry, I missed the question earlier. You'll need to put the outer part, eval( evalexpr( ... ) ) around a bigger chunk of code than you showed. Something like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;split = something;
row_text = ... ;
column_text = ... ;
...
eval(evalexpr(
   ccb = dt&amp;lt;&amp;lt;controlchart(...expr(split)...expr(column_text)...expr(split)...)
))

&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;the variables, split, etc, must be set first. evalexpr will search for the expr and replace them with their values, then eval will run the finished expression.&lt;/P&gt;</description>
      <pubDate>Wed, 29 Mar 2023 09:44:27 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Graphics-script-reported-errors-in-log/m-p/617704#M81724</guid>
      <dc:creator>Craige_Hales</dc:creator>
      <dc:date>2023-03-29T09:44:27Z</dc:date>
    </item>
    <item>
      <title>Re: Graphics script reported errors in log</title>
      <link>https://community.jmp.com/t5/Discussions/Graphics-script-reported-errors-in-log/m-p/617792#M81727</link>
      <description>&lt;P&gt;It finally works!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you very much!&lt;/P&gt;</description>
      <pubDate>Wed, 29 Mar 2023 13:24:44 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Graphics-script-reported-errors-in-log/m-p/617792#M81727</guid>
      <dc:creator>PersuasionCamel</dc:creator>
      <dc:date>2023-03-29T13:24:44Z</dc:date>
    </item>
  </channel>
</rss>

