<?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: How do I combine multiple plots type into a single graph in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-do-I-combine-multiple-plots-type-into-a-single-graph/m-p/581992#M78868</link>
    <description>&lt;P&gt;To add variable lines to a graph try something like this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = open("$Sample_data\Big Class.jmp");

upper_limit = 65;
lower_limit = 55;

gb = dt &amp;lt;&amp;lt; Graph Builder(
	Size( 525, 454 ),
	Show Control Panel( 0 ),
	Variables( X( :weight ), Y( :height ) ),
	Elements( Points( X, Y, Legend( 9 ) ) ),
	SendToReport(
		Dispatch(
			{},
			"height",
			ScaleBox,
			{Add Ref Line( upper_limit, "Solid", "Dark Red", "Upper Limit", 2 ),
			Add Ref Line( lower_limit, "Solid", "Dark Blue", "Lower Limit", 2 )}
		)
	)
);&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-1671115411753.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/48333i01B6F10EDCD068E4/image-size/medium?v=v2&amp;amp;px=400" role="button" title="pmroz_0-1671115411753.png" alt="pmroz_0-1671115411753.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;The way I did this was by:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Creating the graph&lt;/LI&gt;
&lt;LI&gt;Adding the upper and lower limit lines using constant values.&lt;/LI&gt;
&lt;LI&gt;Right-clicked the red triangle and saved the script.&lt;/LI&gt;
&lt;LI&gt;I replaced the constant values with variables.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 15 Dec 2022 14:45:35 GMT</pubDate>
    <dc:creator>pmroz</dc:creator>
    <dc:date>2022-12-15T14:45:35Z</dc:date>
    <item>
      <title>How do I combine multiple plots type into a single graph</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-I-combine-multiple-plots-type-into-a-single-graph/m-p/581477#M78835</link>
      <description>&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;I just want to add "by hands" control limits to a variable, but the issue is that the limits are not constant and vary according to the sample studied.&lt;/P&gt;&lt;P&gt;Do you know if it is possible to put on the same graph points (from the variable) and lines (from the control limits)?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you in advance,&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 11 Jun 2023 11:30:07 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-I-combine-multiple-plots-type-into-a-single-graph/m-p/581477#M78835</guid>
      <dc:creator>ProbitLlama346</dc:creator>
      <dc:date>2023-06-11T11:30:07Z</dc:date>
    </item>
    <item>
      <title>Re: How do I combine multiple plots type into a single graph</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-I-combine-multiple-plots-type-into-a-single-graph/m-p/581515#M78839</link>
      <description>&lt;P&gt;You can add custom lines to most graphs in JMP by right clicking the axis and selecting Axis Settings, then manually adding a line in the Reference Lines section.&lt;/P&gt;
&lt;P&gt;If you're looking to do this programmatically (you mention that the lines you want to add are variable), this can be done as well. Screenshot and script below.&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="Jed_Campbell_0-1671033012313.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/48303iE6405FFA1FB76E78/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Jed_Campbell_0-1671033012313.png" alt="Jed_Campbell_0-1671033012313.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = open ("$SAMPLE_DATA\Big Class.jmp");

var = 145;

Graph Builder(
	Transform Column( "Row", Formula( Row() ) ),
	Size( 794, 355 ),
	Show Control Panel( 0 ),
	Variables( X( :Row ), Y( :weight ) ),
	Elements( Points( X, Y, Legend( 4 ), Jitter Limit( 0.9541 ) ) ),
	SendToReport(
		Dispatch(
			{},
			"weight",
			ScaleBox,
			{Add Ref Line( var, "Solid", "Red", "Custom Limit", 1 )}
		)
	)
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Dec 2022 15:53:37 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-I-combine-multiple-plots-type-into-a-single-graph/m-p/581515#M78839</guid>
      <dc:creator>Jed_Campbell</dc:creator>
      <dc:date>2022-12-14T15:53:37Z</dc:date>
    </item>
    <item>
      <title>Re: How do I combine multiple plots type into a single graph</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-I-combine-multiple-plots-type-into-a-single-graph/m-p/581912#M78863</link>
      <description>&lt;P&gt;Hello, and thank you for your answer.&lt;/P&gt;&lt;P&gt;I knew that the solution right click and add lines would work, but the fact that the limits were variable made it impossible to use.&lt;/P&gt;&lt;P&gt;In fact, the limits were calculated and added to the database in order to be associated with the right sample, that's why I m searching for a way to add lines and points to the same graph&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Dec 2022 13:34:06 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-I-combine-multiple-plots-type-into-a-single-graph/m-p/581912#M78863</guid>
      <dc:creator>ProbitLlama346</dc:creator>
      <dc:date>2022-12-15T13:34:06Z</dc:date>
    </item>
    <item>
      <title>Re: How do I combine multiple plots type into a single graph</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-I-combine-multiple-plots-type-into-a-single-graph/m-p/581943#M78865</link>
      <description>&lt;P&gt;Try building the chart with points first and then right click in the graph area and select Add &amp;gt; Line.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Dec 2022 14:02:05 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-I-combine-multiple-plots-type-into-a-single-graph/m-p/581943#M78865</guid>
      <dc:creator>ih</dc:creator>
      <dc:date>2022-12-15T14:02:05Z</dc:date>
    </item>
    <item>
      <title>Re: How do I combine multiple plots type into a single graph</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-I-combine-multiple-plots-type-into-a-single-graph/m-p/581992#M78868</link>
      <description>&lt;P&gt;To add variable lines to a graph try something like this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = open("$Sample_data\Big Class.jmp");

upper_limit = 65;
lower_limit = 55;

gb = dt &amp;lt;&amp;lt; Graph Builder(
	Size( 525, 454 ),
	Show Control Panel( 0 ),
	Variables( X( :weight ), Y( :height ) ),
	Elements( Points( X, Y, Legend( 9 ) ) ),
	SendToReport(
		Dispatch(
			{},
			"height",
			ScaleBox,
			{Add Ref Line( upper_limit, "Solid", "Dark Red", "Upper Limit", 2 ),
			Add Ref Line( lower_limit, "Solid", "Dark Blue", "Lower Limit", 2 )}
		)
	)
);&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-1671115411753.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/48333i01B6F10EDCD068E4/image-size/medium?v=v2&amp;amp;px=400" role="button" title="pmroz_0-1671115411753.png" alt="pmroz_0-1671115411753.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;The way I did this was by:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Creating the graph&lt;/LI&gt;
&lt;LI&gt;Adding the upper and lower limit lines using constant values.&lt;/LI&gt;
&lt;LI&gt;Right-clicked the red triangle and saved the script.&lt;/LI&gt;
&lt;LI&gt;I replaced the constant values with variables.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Dec 2022 14:45:35 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-I-combine-multiple-plots-type-into-a-single-graph/m-p/581992#M78868</guid>
      <dc:creator>pmroz</dc:creator>
      <dc:date>2022-12-15T14:45:35Z</dc:date>
    </item>
    <item>
      <title>Re: How do I combine multiple plots type into a single graph</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-I-combine-multiple-plots-type-into-a-single-graph/m-p/582002#M78869</link>
      <description>&lt;P&gt;If you want to add the lines separately here's how to do it:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;gb2 = dt &amp;lt;&amp;lt; Graph Builder(
	Size( 525, 454 ),
	Show Control Panel( 0 ),
	Variables( X( :weight ), Y( :height ) ),
	Elements( Points( X, Y, Legend( 9 ) ) ),
);

gb2 &amp;lt;&amp;lt; sendtoreport(
			Dispatch( {}, "height", ScaleBox,
			{Add Ref Line( upper_limit, "Solid", "Dark Red", "Upper Limit", 2 ),
			Add Ref Line( lower_limit, "Solid", "Dark Blue", "Lower Limit", 2 )}
		)
	);
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 15 Dec 2022 14:49:39 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-I-combine-multiple-plots-type-into-a-single-graph/m-p/582002#M78869</guid>
      <dc:creator>pmroz</dc:creator>
      <dc:date>2022-12-15T14:49:39Z</dc:date>
    </item>
  </channel>
</rss>

