<?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 How to modify y-axis on Paired Profiles graph produced by a paired proc ttest in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-modify-y-axis-on-Paired-Profiles-graph-produced-by-a/m-p/957036#M373634</link>
    <description>&lt;P&gt;Hi!&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have paired pre- and post- data variables that are on a scale of 1-5. I ran a simple paired proc ttest using this code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN class=""&gt;&lt;STRONG&gt;ttest&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN class=""&gt;data&lt;/SPAN&gt;=TRUST.fellow_2 sides=&lt;SPAN class=""&gt;&lt;STRONG&gt;2&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN class=""&gt;alpha&lt;/SPAN&gt;=&lt;SPAN class=""&gt;&lt;STRONG&gt;0.05&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN class=""&gt;h0&lt;/SPAN&gt;=&lt;SPAN class=""&gt;&lt;STRONG&gt;0&lt;/STRONG&gt;&lt;/SPAN&gt;;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;title&lt;/SPAN&gt; "Paired sample t-test example"&lt;SPAN class=""&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;paired&lt;/SPAN&gt; pre_comfort_inquiry*post_comfort_inquiry;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/SPAN&gt;;&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;This code helped to produce this paired profiles plot:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Kels123_0-1737696137854.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/103929i86EFC940957E0FB0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Kels123_0-1737696137854.png" alt="Kels123_0-1737696137854.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to modify the range of the y-axis to go from 1-5 instead of 2-5.&amp;nbsp;&lt;/P&gt;&lt;P&gt;(I would also like to modify the printed labels of the pre_comfort_inquiry and post_comfort_inquiry variables as well as the title, but these have work-arounds.)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there any way to modify the y-axis range within the proc ttest function? For example, I would love to be able to add a line like this:&lt;/P&gt;&lt;P class=""&gt;YAXIS LABEL = 'Response' GRID VALUES = (1.0 TO 5.0 BY 0.5);&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;The best option I have read about was using proc sgplot, but I'm not sure how to do this to get the graphics output I want and then be able to modify it in the way that I want.&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;Any example code or guidance would be greatly appreciated! Thank you.&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 24 Jan 2025 05:28:10 GMT</pubDate>
    <dc:creator>Kels123</dc:creator>
    <dc:date>2025-01-24T05:28:10Z</dc:date>
    <item>
      <title>How to modify y-axis on Paired Profiles graph produced by a paired proc ttest</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-modify-y-axis-on-Paired-Profiles-graph-produced-by-a/m-p/957036#M373634</link>
      <description>&lt;P&gt;Hi!&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have paired pre- and post- data variables that are on a scale of 1-5. I ran a simple paired proc ttest using this code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN class=""&gt;&lt;STRONG&gt;ttest&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN class=""&gt;data&lt;/SPAN&gt;=TRUST.fellow_2 sides=&lt;SPAN class=""&gt;&lt;STRONG&gt;2&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN class=""&gt;alpha&lt;/SPAN&gt;=&lt;SPAN class=""&gt;&lt;STRONG&gt;0.05&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN class=""&gt;h0&lt;/SPAN&gt;=&lt;SPAN class=""&gt;&lt;STRONG&gt;0&lt;/STRONG&gt;&lt;/SPAN&gt;;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;title&lt;/SPAN&gt; "Paired sample t-test example"&lt;SPAN class=""&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;paired&lt;/SPAN&gt; pre_comfort_inquiry*post_comfort_inquiry;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/SPAN&gt;;&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;This code helped to produce this paired profiles plot:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Kels123_0-1737696137854.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/103929i86EFC940957E0FB0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Kels123_0-1737696137854.png" alt="Kels123_0-1737696137854.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to modify the range of the y-axis to go from 1-5 instead of 2-5.&amp;nbsp;&lt;/P&gt;&lt;P&gt;(I would also like to modify the printed labels of the pre_comfort_inquiry and post_comfort_inquiry variables as well as the title, but these have work-arounds.)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there any way to modify the y-axis range within the proc ttest function? For example, I would love to be able to add a line like this:&lt;/P&gt;&lt;P class=""&gt;YAXIS LABEL = 'Response' GRID VALUES = (1.0 TO 5.0 BY 0.5);&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;The best option I have read about was using proc sgplot, but I'm not sure how to do this to get the graphics output I want and then be able to modify it in the way that I want.&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;Any example code or guidance would be greatly appreciated! Thank you.&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 24 Jan 2025 05:28:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-modify-y-axis-on-Paired-Profiles-graph-produced-by-a/m-p/957036#M373634</guid>
      <dc:creator>Kels123</dc:creator>
      <dc:date>2025-01-24T05:28:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to modify y-axis on Paired Profiles graph produced by a paired proc ttest</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-modify-y-axis-on-Paired-Profiles-graph-produced-by-a/m-p/957072#M373641</link>
      <description>&lt;P&gt;You could SGPLOT it ,no need PROC TTEST at all.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input subject Baseline month1;
cards;
23 4 4
26 3 1
36 3 1
39 4 1
41 4 3
42 1 3
46 1 1
49 1 1
51 1 1
55 2 4
56 2 1
57 4 1
73 2 1
83 2 1
84 1 1
85 3 2
89 1 1
96 2 1
101 2 3
112 2 1
117 4 1
120 2 1
124 2 1
;
run;

proc transpose data= have out=canplot prefix=y;
   by subject;
run;
proc sql;
create table want as
select *,ifn(_NAME_='Baseline',1,2) as g from canplot
outer union 
select 1 as x2,median(Baseline) as y2 from have   /*Baseline*/
outer union corr
select 2 as x2,median(month1) as y2 from have  /*month1*/
;quit;

title 'Change in Score';
proc sgplot data=want noautolegend noborder aspect=0.5;
styleattrs datacontrastcolors=(orange black) datalinepatterns=(solid dash);
  series x=g y=y1 / group=subject lineattrs=(color=orange thickness=8 pattern=solid) transparency=0.5;
  series x=x2 y=y2/lineattrs=(color=black thickness=8 pattern=dash);
  xaxis type=linear offsetmin=0.01 values=(0.5 1 2 2.5) valuesdisplay=(' ' 'Baseline' '1 month' ' ') display=(nolabel noline noticks);
  yaxis  LABEL = 'Response' GRID VALUES = (1.0 TO 5.0 BY 0.5) grid display=(noline noticks) valuesformat=best.;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ksharp_0-1737702049819.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/103956iF270961AEC5ECC7D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ksharp_0-1737702049819.png" alt="Ksharp_0-1737702049819.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 24 Jan 2025 07:01:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-modify-y-axis-on-Paired-Profiles-graph-produced-by-a/m-p/957072#M373641</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2025-01-24T07:01:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to modify y-axis on Paired Profiles graph produced by a paired proc ttest</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-modify-y-axis-on-Paired-Profiles-graph-produced-by-a/m-p/957190#M373673</link>
      <description>&lt;P&gt;Thank you so much! This is definitely getting me on the right track. I did notice, however, that the output is different. Initially, this is what the output looked like from proc ttest:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Kels123_0-1737755151799.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/103986i0E85BC7AADE276B9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Kels123_0-1737755151799.png" alt="Kels123_0-1737755151799.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is my code, which is essentially the code you provided but with dataset names and variable labels modified. I also changed "median" to "mean" in these lines:&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;select&lt;/SPAN&gt; &lt;SPAN class=""&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN class=""&gt;as&lt;/SPAN&gt; x2,mean(pre_comfort_inquiry) &lt;SPAN class=""&gt;as&lt;/SPAN&gt; y2 &lt;SPAN class=""&gt;from&lt;/SPAN&gt; TRUST.fellow_2 &lt;SPAN class=""&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class=""&gt;/*Pre*/&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;MY CODE:&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN class=""&gt;&lt;STRONG&gt;sort&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN class=""&gt;data&lt;/SPAN&gt;=TRUST.fellow_2; &lt;SPAN class=""&gt;by&lt;/SPAN&gt; record_ID; &lt;SPAN class=""&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/SPAN&gt;;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN class=""&gt;&lt;STRONG&gt;transpose&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN class=""&gt;data&lt;/SPAN&gt;=TRUST.fellow_2 &lt;SPAN class=""&gt;out&lt;/SPAN&gt;=canplot &lt;SPAN class=""&gt;prefix&lt;/SPAN&gt;=y;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;by&lt;/SPAN&gt; record_ID;&lt;SPAN class=""&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;where&lt;/SPAN&gt; post_distress ne &lt;SPAN class=""&gt;&lt;STRONG&gt;.&lt;/STRONG&gt;&lt;/SPAN&gt; ;&lt;/P&gt;&lt;P class=""&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;SPAN class=""&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt; &lt;STRONG&gt;sql&lt;/STRONG&gt;&lt;SPAN class=""&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;create&lt;/SPAN&gt; &lt;SPAN class=""&gt;table&lt;/SPAN&gt; want_inquiry &lt;SPAN class=""&gt;as&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;select&lt;/SPAN&gt; *,ifn(_NAME_=&lt;SPAN class=""&gt;'pre_comfort_inquiry'&lt;/SPAN&gt;,&lt;SPAN class=""&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/SPAN&gt;,&lt;SPAN class=""&gt;&lt;STRONG&gt;2&lt;/STRONG&gt;&lt;/SPAN&gt;) &lt;SPAN class=""&gt;as&lt;/SPAN&gt; g &lt;SPAN class=""&gt;from&lt;/SPAN&gt; canplot&lt;/P&gt;&lt;P class=""&gt;outer union&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;select&lt;/SPAN&gt; &lt;SPAN class=""&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN class=""&gt;as&lt;/SPAN&gt; x2,mean(pre_comfort_inquiry) &lt;SPAN class=""&gt;as&lt;/SPAN&gt; y2 &lt;SPAN class=""&gt;from&lt;/SPAN&gt; TRUST.fellow_2 &lt;SPAN class=""&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class=""&gt;/*Pre*/&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;outer union&lt;SPAN class=""&gt; corr&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;select&lt;/SPAN&gt; &lt;SPAN class=""&gt;&lt;STRONG&gt;2&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN class=""&gt;as&lt;/SPAN&gt; x2,mean(post_comfort_inquiry) &lt;SPAN class=""&gt;as&lt;/SPAN&gt; y2 &lt;SPAN class=""&gt;from&lt;/SPAN&gt; TRUST.fellow_2&lt;SPAN class=""&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class=""&gt;/*Post*/&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;;&lt;/SPAN&gt;&lt;STRONG&gt;quit&lt;/STRONG&gt;&lt;SPAN class=""&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;title&lt;/SPAN&gt; 'Change in Comfort Level Score for Trauma Inquiry'&lt;SPAN class=""&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN class=""&gt;&lt;STRONG&gt;sgplot&lt;/STRONG&gt;&lt;/SPAN&gt; data&lt;SPAN class=""&gt;=want_inquiry &lt;/SPAN&gt;noautolegend noborder aspect&lt;SPAN class=""&gt;=&lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;STRONG&gt;0.5&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;styleattrs datacontrastcolors&lt;SPAN class=""&gt;=(orange black) &lt;/SPAN&gt;datalinepatterns&lt;SPAN class=""&gt;=(solid dash);&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;series x&lt;SPAN class=""&gt;=g &lt;/SPAN&gt;y&lt;SPAN class=""&gt;=y1 / &lt;/SPAN&gt;group&lt;SPAN class=""&gt;=record_ID &lt;/SPAN&gt;lineattrs&lt;SPAN class=""&gt;=(&lt;/SPAN&gt;color&lt;SPAN class=""&gt;=orange &lt;/SPAN&gt;thickness&lt;SPAN class=""&gt;=&lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;STRONG&gt;8&lt;/STRONG&gt;&lt;/SPAN&gt; pattern&lt;SPAN class=""&gt;=solid) &lt;/SPAN&gt;transparency&lt;SPAN class=""&gt;=&lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;STRONG&gt;0.5&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;series x&lt;SPAN class=""&gt;=x2 &lt;/SPAN&gt;y&lt;SPAN class=""&gt;=y2/&lt;/SPAN&gt;lineattrs&lt;SPAN class=""&gt;=(&lt;/SPAN&gt;color&lt;SPAN class=""&gt;=black &lt;/SPAN&gt;thickness&lt;SPAN class=""&gt;=&lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;STRONG&gt;8&lt;/STRONG&gt;&lt;/SPAN&gt; pattern&lt;SPAN class=""&gt;=dash);&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class=""&gt;xaxis&lt;/SPAN&gt; &lt;SPAN class=""&gt;type&lt;/SPAN&gt;=linear &lt;SPAN class=""&gt;offsetmin&lt;/SPAN&gt;=&lt;SPAN class=""&gt;&lt;STRONG&gt;0.01&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN class=""&gt;values&lt;/SPAN&gt;=(&lt;SPAN class=""&gt;&lt;STRONG&gt;0.5&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN class=""&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN class=""&gt;&lt;STRONG&gt;2&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN class=""&gt;&lt;STRONG&gt;2.5&lt;/STRONG&gt;&lt;/SPAN&gt;) &lt;SPAN class=""&gt;valuesdisplay&lt;/SPAN&gt;=(&lt;SPAN class=""&gt;' '&lt;/SPAN&gt; &lt;SPAN class=""&gt;'Pre-Training'&lt;/SPAN&gt; &lt;SPAN class=""&gt;'Post-Training'&lt;/SPAN&gt; &lt;SPAN class=""&gt;' '&lt;/SPAN&gt;) &lt;SPAN class=""&gt;display&lt;/SPAN&gt;=(nolabel noline noticks);&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class=""&gt;yaxis&lt;/SPAN&gt;&lt;SPAN class=""&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class=""&gt;LABEL&lt;/SPAN&gt; = &lt;SPAN class=""&gt;'Response'&lt;/SPAN&gt; &lt;SPAN class=""&gt;GRID&lt;/SPAN&gt; &lt;SPAN class=""&gt;VALUES&lt;/SPAN&gt; = (&lt;SPAN class=""&gt;&lt;STRONG&gt;1.0&lt;/STRONG&gt;&lt;/SPAN&gt; TO &lt;SPAN class=""&gt;&lt;STRONG&gt;5.0&lt;/STRONG&gt;&lt;/SPAN&gt; BY &lt;SPAN class=""&gt;&lt;STRONG&gt;0.5&lt;/STRONG&gt;&lt;/SPAN&gt;) &lt;SPAN class=""&gt;grid&lt;/SPAN&gt; &lt;SPAN class=""&gt;display&lt;/SPAN&gt;=(noline noticks) &lt;SPAN class=""&gt;valuesformat&lt;/SPAN&gt;=&lt;SPAN class=""&gt;best.&lt;/SPAN&gt;;&lt;/P&gt;&lt;P class=""&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;SPAN class=""&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;This is what the output looks like. Clearly something is a bit off because the lines are different, dip below 1 (there are no values below 1 that exist), and there is also an odd vertical line at the "post-training" point:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Kels123_1-1737755180921.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/103987i29AFCF30D6D19661/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Kels123_1-1737755180921.png" alt="Kels123_1-1737755180921.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I went through the code line by line to try to detect errors, but wondering if you can tell from the output what I might need to adjust?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In case you are wondering, if I don't change "median" to "mean" in those two coding lines, this is what the output looks like (not too different):&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Kels123_2-1737755275839.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/103988i3902572CCED26232/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Kels123_2-1737755275839.png" alt="Kels123_2-1737755275839.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks again!&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 24 Jan 2025 21:49:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-modify-y-axis-on-Paired-Profiles-graph-produced-by-a/m-p/957190#M373673</guid>
      <dc:creator>Kels123</dc:creator>
      <dc:date>2025-01-24T21:49:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to modify y-axis on Paired Profiles graph produced by a paired proc ttest</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-modify-y-axis-on-Paired-Profiles-graph-produced-by-a/m-p/957207#M373683</link>
      <description>&lt;P&gt;That would be better if you could post some data to test your code to address your problem.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input subject Baseline month1;
cards;
23 4 4
26 3 1
36 3 1
39 4 1
41 4 3
42 1 3
46 1 1
49 1 1
51 1 1
55 2 4
56 2 1
57 4 1
73 2 1
83 2 1
84 1 1
85 3 2
89 1 1
96 2 1
101 2 3
112 2 1
117 4 1
120 2 1
124 2 1
;
run;

proc transpose data= have out=canplot prefix=y;
   by subject;
run;
proc sql;
create table want as
select *,ifn(_NAME_='Baseline',1,2) as g from canplot
outer union 
select 1 as x2,mean(Baseline) as y2 from have   /*Baseline*/
outer union corr
select 2 as x2,mean(month1) as y2 from have  /*month1*/
;quit;

title 'Change in Score';
proc sgplot data=want ;
  series x=g y=y1 / group=subject lineattrs=(color=blue pattern=solid) transparency=0.5;
  series x=g y=y1 / group=subject lineattrs=(thickness=0)  y2axis;
  series x=x2 y=y2/lineattrs=(color=orange thickness=4 pattern=solid) name='mean' legendlabel='Mean';
  xaxis type=linear offsetmin=0.01 values=(0.5 1 2 2.5) valuesdisplay=(' ' 'Pre_comfort_inquiry' 'Post_comfort_inquiry' ' ') display=(nolabel);
  yaxis  LABEL = 'Response' GRID VALUES = (0 TO 5.0 BY 0.5) grid display=( noticks) valuesformat=best.;
  y2axis  display=( noticks nolabel) VALUES = (0 TO 5.0 BY 0.5) valuesformat=best.;
  keylegend 'mean' /position=bottom location=inside ;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ksharp_0-1737769230378.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/103993iB7423AAA5E5D8497/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ksharp_0-1737769230378.png" alt="Ksharp_0-1737769230378.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>Sat, 25 Jan 2025 01:40:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-modify-y-axis-on-Paired-Profiles-graph-produced-by-a/m-p/957207#M373683</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2025-01-25T01:40:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to modify y-axis on Paired Profiles graph produced by a paired proc ttest</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-modify-y-axis-on-Paired-Profiles-graph-produced-by-a/m-p/957215#M373686</link>
      <description>&lt;P&gt;Of course! Here is my data for the variable post_comfort_inquiry:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Id&amp;nbsp; pre_comfort_inquiry&amp;nbsp; post_comfort_inquiry&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;AH5528 4 4&lt;/P&gt;&lt;P&gt;AL6451 4 4&lt;/P&gt;&lt;P&gt;AS6403 5 5&lt;/P&gt;&lt;P&gt;AS7965 4 5&lt;/P&gt;&lt;P&gt;CB7099 3 3&lt;/P&gt;&lt;P&gt;CJ3713 2 4&lt;/P&gt;&lt;P&gt;CL8387 3 4&lt;/P&gt;&lt;P&gt;EG3035 2 3&lt;/P&gt;&lt;P&gt;ES6296 2 4&lt;/P&gt;&lt;P&gt;GT1089 4 5&lt;/P&gt;&lt;P&gt;HN1886 2 3&lt;/P&gt;&lt;P&gt;JC6920 4 4&lt;/P&gt;&lt;P&gt;KG1333 3 3&lt;/P&gt;&lt;P&gt;KG3315 4 4&lt;/P&gt;&lt;P&gt;LP2936 3 4&lt;/P&gt;&lt;P&gt;LR2526 4 5&lt;/P&gt;&lt;P&gt;MM5879 4 4&lt;/P&gt;&lt;P&gt;MP3640 3 4&lt;/P&gt;&lt;P&gt;MS4312 2 5&lt;/P&gt;&lt;P&gt;NA6176 4 4&lt;/P&gt;&lt;P&gt;ND4436 4 4&lt;/P&gt;&lt;P&gt;OM7859 3 4&lt;/P&gt;&lt;P&gt;PF2214 4 4&lt;/P&gt;&lt;P&gt;RJ8260 3 4&lt;/P&gt;&lt;P&gt;RM1809 2 4&lt;/P&gt;&lt;P&gt;SK8223 4 4&lt;/P&gt;&lt;P&gt;SN6295 4 4&lt;/P&gt;&lt;P&gt;TG0311 4 4&lt;/P&gt;&lt;P&gt;TK0180 5 4&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you so much for any guidance you can offer!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 25 Jan 2025 06:21:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-modify-y-axis-on-Paired-Profiles-graph-produced-by-a/m-p/957215#M373686</guid>
      <dc:creator>Kels123</dc:creator>
      <dc:date>2025-01-25T06:21:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to modify y-axis on Paired Profiles graph produced by a paired proc ttest</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-modify-y-axis-on-Paired-Profiles-graph-produced-by-a/m-p/957217#M373687</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input Id  $ pre_comfort_inquiry  post_comfort_inquiry;
cards;
AH5528 4 4
AL6451 4 4
AS6403 5 5
AS7965 4 5
CB7099 3 3
CJ3713 2 4
CL8387 3 4
EG3035 2 3
ES6296 2 4
GT1089 4 5
HN1886 2 3
JC6920 4 4
KG1333 3 3
KG3315 4 4
LP2936 3 4
LR2526 4 5
MM5879 4 4
MP3640 3 4
MS4312 2 5
NA6176 4 4
ND4436 4 4
OM7859 3 4
PF2214 4 4
RJ8260 3 4
RM1809 2 4
SK8223 4 4
SN6295 4 4
TG0311 4 4
TK0180 5 4
;
run;

proc transpose data= have out=canplot prefix=y;
   by id;
run;
proc sql;
create table want as
select *,ifn(lowcase(_NAME_)='pre_comfort_inquiry',1,2) as g from canplot
outer union 
select 1 as x2,mean(pre_comfort_inquiry) as y2 from have   /*Baseline*/
outer union corr
select 2 as x2,mean(post_comfort_inquiry) as y2 from have  /*month1*/
;quit;

title 'Change in Score';
proc sgplot data=want ;
  series x=g y=y1 / group=id lineattrs=(color=blue pattern=solid) transparency=0.5;
  series x=g y=y1 / group=id lineattrs=(thickness=0)  y2axis;
  series x=x2 y=y2/lineattrs=(color=orange thickness=4 pattern=solid) name='mean' legendlabel='Mean';
  xaxis type=linear offsetmin=0.01 values=(0.5 1 2 2.5) valuesdisplay=(' ' 'Pre_comfort_inquiry' 'Post_comfort_inquiry' ' ') display=(nolabel);
  yaxis  LABEL = 'Response' GRID VALUES = (1 TO 5.0 BY 0.5) grid display=( noticks) ;
  y2axis  display=( noticks nolabel) VALUES = (1 TO 5.0 BY 0.5);
  keylegend 'mean' /position=bottom location=inside ;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ksharp_0-1737788820446.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/103996i824AE1B0C637BD73/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ksharp_0-1737788820446.png" alt="Ksharp_0-1737788820446.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 25 Jan 2025 07:07:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-modify-y-axis-on-Paired-Profiles-graph-produced-by-a/m-p/957217#M373687</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2025-01-25T07:07:07Z</dc:date>
    </item>
  </channel>
</rss>

