<?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: Add reference line to Y-group axis in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Add-reference-line-to-Y-group-axis/m-p/720312#M90253</link>
    <description>&lt;P&gt;I don't want it as a separate line graph. I just don't know how to do the script for it.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 30 Jan 2024 19:51:07 GMT</pubDate>
    <dc:creator>patriciafm811</dc:creator>
    <dc:date>2024-01-30T19:51:07Z</dc:date>
    <item>
      <title>Add reference line to Y-group axis</title>
      <link>https://community.jmp.com/t5/Discussions/Add-reference-line-to-Y-group-axis/m-p/720275#M90246</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using graph builder (JMP 17) and have almost what I need. But I need to add a reference line.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This first image ('example') is what I currently have (I need all 3 viruses in 1 graph with lines and dots for the rates for both years).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="patriciafm811_0-1706640947824.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/60760iD7F06ED68C1B64DF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="patriciafm811_0-1706640947824.png" alt="patriciafm811_0-1706640947824.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;BUT, I need to add a reference line for each virus so that it looks like 'example with ref line' (below).&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="patriciafm811_1-1706641063371.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/60761i92FEB3DE9BBE22D5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="patriciafm811_1-1706641063371.png" alt="patriciafm811_1-1706641063371.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don't know if it is possible. But essentially, I am trying to get a reference line to show up for each one my y-groups. I can use JSL if someone has something that will work using scripts.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jan 2024 18:59:39 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Add-reference-line-to-Y-group-axis/m-p/720275#M90246</guid>
      <dc:creator>patriciafm811</dc:creator>
      <dc:date>2024-01-30T18:59:39Z</dc:date>
    </item>
    <item>
      <title>Re: Add reference line to Y-group axis</title>
      <link>https://community.jmp.com/t5/Discussions/Add-reference-line-to-Y-group-axis/m-p/720294#M90247</link>
      <description>&lt;P&gt;Based on what is the reference line plotted from? How does your data look like?&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jan 2024 19:08:45 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Add-reference-line-to-Y-group-axis/m-p/720294#M90247</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2024-01-30T19:08:45Z</dc:date>
    </item>
    <item>
      <title>Re: Add reference line to Y-group axis</title>
      <link>https://community.jmp.com/t5/Discussions/Add-reference-line-to-Y-group-axis/m-p/720295#M90248</link>
      <description>&lt;P&gt;The blue and red lines are my data, but I want to add in a CDC line (which is only available for the year and not monthly like my data) as the green line.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jan 2024 19:20:50 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Add-reference-line-to-Y-group-axis/m-p/720295#M90248</guid>
      <dc:creator>patriciafm811</dc:creator>
      <dc:date>2024-01-30T19:20:50Z</dc:date>
    </item>
    <item>
      <title>Re: Add reference line to Y-group axis</title>
      <link>https://community.jmp.com/t5/Discussions/Add-reference-line-to-Y-group-axis/m-p/720310#M90252</link>
      <description>&lt;P&gt;Depending on how your data is formatted, you might be able to add it as a separate line graph or you could add reference lines through scripting.&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jan 2024 19:45:41 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Add-reference-line-to-Y-group-axis/m-p/720310#M90252</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2024-01-30T19:45:41Z</dc:date>
    </item>
    <item>
      <title>Re: Add reference line to Y-group axis</title>
      <link>https://community.jmp.com/t5/Discussions/Add-reference-line-to-Y-group-axis/m-p/720312#M90253</link>
      <description>&lt;P&gt;I don't want it as a separate line graph. I just don't know how to do the script for it.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jan 2024 19:51:07 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Add-reference-line-to-Y-group-axis/m-p/720312#M90253</guid>
      <dc:creator>patriciafm811</dc:creator>
      <dc:date>2024-01-30T19:51:07Z</dc:date>
    </item>
    <item>
      <title>Re: Add reference line to Y-group axis</title>
      <link>https://community.jmp.com/t5/Discussions/Add-reference-line-to-Y-group-axis/m-p/720314#M90255</link>
      <description>&lt;P&gt;Is there a specific reason for not wanting separate line graph?&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jan 2024 19:54:48 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Add-reference-line-to-Y-group-axis/m-p/720314#M90255</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2024-01-30T19:54:48Z</dc:date>
    </item>
    <item>
      <title>Re: Add reference line to Y-group axis</title>
      <link>https://community.jmp.com/t5/Discussions/Add-reference-line-to-Y-group-axis/m-p/720316#M90257</link>
      <description>&lt;P&gt;It isn't really a line graph if there is only 1 data point (from the CDC). We just need it as a reference, not part of the actual data.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jan 2024 20:01:17 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Add-reference-line-to-Y-group-axis/m-p/720316#M90257</guid>
      <dc:creator>patriciafm811</dc:creator>
      <dc:date>2024-01-30T20:01:17Z</dc:date>
    </item>
    <item>
      <title>Re: Add reference line to Y-group axis</title>
      <link>https://community.jmp.com/t5/Discussions/Add-reference-line-to-Y-group-axis/m-p/720318#M90258</link>
      <description>&lt;P&gt;You can go the complicated way of using graphic script&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1); 

dt = open("$SAMPLE_DATA/Big Class.jmp");

gb = dt &amp;lt;&amp;lt; Graph Builder(
	Variables(X(:weight), Y(:height), Group Y(:sex)),
	Elements(Points(X, Y, Legend(11)))
);

fbs = Report(gb) &amp;lt;&amp;lt; XPath("//FrameBox");
lines = {60, 65};

For Each({fb, idx}, fbs,
	Eval(EvalExpr(
		fb &amp;lt;&amp;lt; Add Graphics Script(
			H Line(Expr(lines[idx]));
		);
	));
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;or easier option of adding new chart&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1); 

dt = open("$SAMPLE_DATA/Big Class.jmp");

dt &amp;lt;&amp;lt; New Column("Line", Numeric, Continuous, &amp;lt;&amp;lt; Set Each Value(
	If(:sex == "M", 65, 60)
));

gb = dt &amp;lt;&amp;lt; Graph Builder(
	Size(567, 523),
	Show Control Panel(0),
	Variables(X(:weight), Y(:height), Y(:Line, Position(1)), Group Y(:sex)),
	Elements(Points(X, Y(1), Legend(8)), Line(Y(2), Legend(10)))
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 30 Jan 2024 20:04:42 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Add-reference-line-to-Y-group-axis/m-p/720318#M90258</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2024-01-30T20:04:42Z</dc:date>
    </item>
    <item>
      <title>Re: Add reference line to Y-group axis</title>
      <link>https://community.jmp.com/t5/Discussions/Add-reference-line-to-Y-group-axis/m-p/720333#M90262</link>
      <description>&lt;P&gt;...and you could do a slightly different version of that by using the "Page" function. That allows you to specify individual Ref lines per Virus. However the visual is not so nice, since it creates 3 different graphs basically:&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="Florian_Vogt_0-1706646632251.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/60765i9CDA072030C4EC7D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Florian_Vogt_0-1706646632251.png" alt="Florian_Vogt_0-1706646632251.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best&lt;/P&gt;
&lt;P&gt;Florian&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jan 2024 20:31:13 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Add-reference-line-to-Y-group-axis/m-p/720333#M90262</guid>
      <dc:creator>Florian_Vogt</dc:creator>
      <dc:date>2024-01-30T20:31:13Z</dc:date>
    </item>
    <item>
      <title>Re: Add reference line to Y-group axis</title>
      <link>https://community.jmp.com/t5/Discussions/Add-reference-line-to-Y-group-axis/m-p/720347#M90263</link>
      <description>&lt;P&gt;You can add the horizontal line in Graph Builder.&amp;nbsp; Double-click on the Y axis and put a value in to the reference line section.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="pmroz_1-1706646913453.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/60767iDF7F04B1BA7E71B7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="pmroz_1-1706646913453.png" alt="pmroz_1-1706646913453.png" /&gt;&lt;/span&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="pmroz_2-1706646934846.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/60768i2CCFB0F11049E8D3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="pmroz_2-1706646934846.png" alt="pmroz_2-1706646934846.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jan 2024 20:36:07 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Add-reference-line-to-Y-group-axis/m-p/720347#M90263</guid>
      <dc:creator>pmroz</dc:creator>
      <dc:date>2024-01-30T20:36:07Z</dc:date>
    </item>
    <item>
      <title>Re: Add reference line to Y-group axis</title>
      <link>https://community.jmp.com/t5/Discussions/Add-reference-line-to-Y-group-axis/m-p/720749#M90286</link>
      <description>&lt;P&gt;But I need to do this for the Y-Group, not the Y-Axis.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 31 Jan 2024 13:09:17 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Add-reference-line-to-Y-group-axis/m-p/720749#M90286</guid>
      <dc:creator>patriciafm811</dc:creator>
      <dc:date>2024-01-31T13:09:17Z</dc:date>
    </item>
    <item>
      <title>Re: Add reference line to Y-group axis</title>
      <link>https://community.jmp.com/t5/Discussions/Add-reference-line-to-Y-group-axis/m-p/720927#M90301</link>
      <description>&lt;P&gt;Not sure anymore what lines we are plotting here&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1); 

dt = open("$SAMPLE_DATA/Big Class.jmp");

gb = dt &amp;lt;&amp;lt; Graph Builder(
	Variables(X(:weight), Y(:height), Group Y(:sex)),
	Elements(Points(X, Y, Legend(11)))
);

fbs = Report(gb) &amp;lt;&amp;lt; XPath("//FrameBox");

lines = {60, 65};

For Each({fb, idx}, fbs,
	fb &amp;lt;&amp;lt; Add Line Annotation(Line({478, (192 / (70.76 - 50)) * (70.76 - lines[idx])}, {478 + 42, (192 / (70.76 - 50)) * (70.76 - lines[idx])}), Color("Blue"));
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_0-1706721139746.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/60787i18AF8C6B341A48AD/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_0-1706721139746.png" alt="jthi_0-1706721139746.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 31 Jan 2024 17:12:31 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Add-reference-line-to-Y-group-axis/m-p/720927#M90301</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2024-01-31T17:12:31Z</dc:date>
    </item>
    <item>
      <title>Re: Add reference line to Y-group axis</title>
      <link>https://community.jmp.com/t5/Discussions/Add-reference-line-to-Y-group-axis/m-p/720953#M90304</link>
      <description>&lt;P&gt;Attached is the data file. I only need 2022 and 2023 in the final graph.&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is what it should like (but instead of gray lines, they are green, and actually in there instead of just drawn in manually at a guess). The line for HIV is 12.7, HCV is 1.6, and HBV is 0.6.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="patriciafm811_0-1706725823003.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/60789i793314A47DE7BBEC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="patriciafm811_0-1706725823003.png" alt="patriciafm811_0-1706725823003.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 31 Jan 2024 18:31:59 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Add-reference-line-to-Y-group-axis/m-p/720953#M90304</guid>
      <dc:creator>patriciafm811</dc:creator>
      <dc:date>2024-01-31T18:31:59Z</dc:date>
    </item>
    <item>
      <title>Re: Add reference line to Y-group axis</title>
      <link>https://community.jmp.com/t5/Discussions/Add-reference-line-to-Y-group-axis/m-p/720989#M90306</link>
      <description>&lt;P&gt;I still think it would be better to create new column into your data table with the values and use separate line chart, but here is graphic script version&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

dt = Open("$DOWNLOADS/Stacked Combined CSV files.jmp");

gb = dt &amp;lt;&amp;lt; Run Script("PPTA Overall Infection Rates All");

fbs = Report(gb) &amp;lt;&amp;lt; XPath("//FrameBox");
lines = {12.7, 1.6, 0.6}; // These must be in correct order (using associative array could be better idea

For Each({fb, idx}, fbs,
	Eval(EvalExpr(
		fb &amp;lt;&amp;lt; Add Graphics Script(
			Pen Color("Green");
			H Line(Expr(lines[idx]));
		);
	));
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_0-1706728177565.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/60791iC4154BDDC2360F80/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_0-1706728177565.png" alt="jthi_0-1706728177565.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 31 Jan 2024 19:10:07 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Add-reference-line-to-Y-group-axis/m-p/720989#M90306</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2024-01-31T19:10:07Z</dc:date>
    </item>
    <item>
      <title>Re: Add reference line to Y-group axis</title>
      <link>https://community.jmp.com/t5/Discussions/Add-reference-line-to-Y-group-axis/m-p/720999#M90307</link>
      <description>&lt;P&gt;I will try this. I don't want to add columns to the existing file.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 31 Jan 2024 19:31:59 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Add-reference-line-to-Y-group-axis/m-p/720999#M90307</guid>
      <dc:creator>patriciafm811</dc:creator>
      <dc:date>2024-01-31T19:31:59Z</dc:date>
    </item>
  </channel>
</rss>

