<?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 subscript in y-axis title in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Need-subscript-in-y-axis-title/m-p/845083#M23313</link>
    <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/*
Here is an example
*/
/*用于加X轴Y轴标签的上下标*/
data _anno;
length label $ 200;
 drawspace="layoutpercent"; function="text"; textweight="normal"; textsize=12;textcolor="black"; width=200;
 x1=50; y1=2.5;label="AUC(*ESC*){sub '0-inf'}"; output;
 x1=2.5;y1=50;rotate=90;label="AUC(*ESC*){sup 'max'}"; output;
 run;
/*****画散点图*****/
title ;
proc sgplot data=sashelp.class sganno=_anno;   
scatter x=weight y=height;   
xaxis label=' ';
yaxis label=' ';
run;
title;&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-1668772234094.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/77436i8AA0299EE9D2D44B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ksharp_0-1668772234094.png" alt="Ksharp_0-1668772234094.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 18 Nov 2022 11:50:06 GMT</pubDate>
    <dc:creator>Ksharp</dc:creator>
    <dc:date>2022-11-18T11:50:06Z</dc:date>
    <item>
      <title>Need subscript in y-axis title</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Need-subscript-in-y-axis-title/m-p/844961#M23308</link>
      <description>&lt;P&gt;Hi, I'm outputting a figure from proc sgplot to RTF with ODS. I need to get some subscripts in my y-axis titles since it's PK parameters. Here's an example of what I tried.&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc format;
	value trtf
	2='0.25 mg/kg'
	3='0.75 mg/kg'
	4='1.50 mg/kg'
	5='3.0 mg/kg'
	6='6.0 mg/kg'
	7='12.0 mg/kg'
	8='24.0 mg/kg'
	9='48.0 mg/kg'
	;

	value paramf
	1="AUC&amp;amp;esc.{sub 0-inf} (h*ng/mL)"
	2="AUC&amp;amp;esc.{sub 0-24} (h*ng/mL)"
	3="AUC&amp;amp;esc.{sub 0-t} (h*ng/mL)"
	6="C&amp;amp;esc.{sub max} (ng/mL)"
	14="T&amp;amp;esc.{sub max} (h)"
	;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;amp;esc is a macro variable for escape character. This is the way I know to get subscript but it's not coming out right in output.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Nov 2022 20:13:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Need-subscript-in-y-axis-title/m-p/844961#M23308</guid>
      <dc:creator>tarheel13</dc:creator>
      <dc:date>2022-11-17T20:13:53Z</dc:date>
    </item>
    <item>
      <title>Re: Need subscript in y-axis title</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Need-subscript-in-y-axis-title/m-p/844966#M23309</link>
      <description>Have you tried it with the actual escape character to see if the macro facility is not resolving the macro variable? I have only used unicode characters in formats with the format statement in open code like this: (*ESC*){unicode '2013'x}</description>
      <pubDate>Thu, 17 Nov 2022 20:27:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Need-subscript-in-y-axis-title/m-p/844966#M23309</guid>
      <dc:creator>svh</dc:creator>
      <dc:date>2022-11-17T20:27:59Z</dc:date>
    </item>
    <item>
      <title>Re: Need subscript in y-axis title</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Need-subscript-in-y-axis-title/m-p/844971#M23310</link>
      <description>&lt;P&gt;I have read on here that axis titles don't support sub and sup commands. I got 0 and - to subscript but I can't get the lowercase t.&lt;/P&gt;</description>
      <pubDate>Thu, 17 Nov 2022 20:45:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Need-subscript-in-y-axis-title/m-p/844971#M23310</guid>
      <dc:creator>tarheel13</dc:creator>
      <dc:date>2022-11-17T20:45:20Z</dc:date>
    </item>
    <item>
      <title>Re: Need subscript in y-axis title</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Need-subscript-in-y-axis-title/m-p/844975#M23311</link>
      <description>This thread suggests it can work if you find the right unicode text.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://communities.sas.com/t5/Graphics-Programming/Superscript-in-axis-label-SGPLOT/td-p/529656" target="_blank"&gt;https://communities.sas.com/t5/Graphics-Programming/Superscript-in-axis-label-SGPLOT/td-p/529656&lt;/A&gt;</description>
      <pubDate>Thu, 17 Nov 2022 20:58:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Need-subscript-in-y-axis-title/m-p/844975#M23311</guid>
      <dc:creator>svh</dc:creator>
      <dc:date>2022-11-17T20:58:31Z</dc:date>
    </item>
    <item>
      <title>Re: Need subscript in y-axis title</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Need-subscript-in-y-axis-title/m-p/844985#M23312</link>
      <description>&lt;P&gt;came across that thread today as well but today I was just informed that I don't need to do the subscript.&lt;/P&gt;</description>
      <pubDate>Thu, 17 Nov 2022 21:28:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Need-subscript-in-y-axis-title/m-p/844985#M23312</guid>
      <dc:creator>tarheel13</dc:creator>
      <dc:date>2022-11-17T21:28:52Z</dc:date>
    </item>
    <item>
      <title>Re: Need subscript in y-axis title</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Need-subscript-in-y-axis-title/m-p/845083#M23313</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/*
Here is an example
*/
/*用于加X轴Y轴标签的上下标*/
data _anno;
length label $ 200;
 drawspace="layoutpercent"; function="text"; textweight="normal"; textsize=12;textcolor="black"; width=200;
 x1=50; y1=2.5;label="AUC(*ESC*){sub '0-inf'}"; output;
 x1=2.5;y1=50;rotate=90;label="AUC(*ESC*){sup 'max'}"; output;
 run;
/*****画散点图*****/
title ;
proc sgplot data=sashelp.class sganno=_anno;   
scatter x=weight y=height;   
xaxis label=' ';
yaxis label=' ';
run;
title;&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-1668772234094.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/77436i8AA0299EE9D2D44B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ksharp_0-1668772234094.png" alt="Ksharp_0-1668772234094.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Nov 2022 11:50:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Need-subscript-in-y-axis-title/m-p/845083#M23313</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2022-11-18T11:50:06Z</dc:date>
    </item>
    <item>
      <title>Re: Need subscript in y-axis title</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Need-subscript-in-y-axis-title/m-p/845116#M23314</link>
      <description>&lt;P&gt;Thanks. can try next week. I have to do different labels for each PK parameter though. Would I need a different _anno dataset then for each PK parameter?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Nov 2022 14:11:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Need-subscript-in-y-axis-title/m-p/845116#M23314</guid>
      <dc:creator>tarheel13</dc:creator>
      <dc:date>2022-11-18T14:11:50Z</dc:date>
    </item>
    <item>
      <title>Re: Need subscript in y-axis title</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Need-subscript-in-y-axis-title/m-p/845255#M23316</link>
      <description>I don't understand what you mean. &lt;BR /&gt;Post a picture to explain .</description>
      <pubDate>Sat, 19 Nov 2022 08:42:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Need-subscript-in-y-axis-title/m-p/845255#M23316</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2022-11-19T08:42:33Z</dc:date>
    </item>
    <item>
      <title>Re: Need subscript in y-axis title</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Need-subscript-in-y-axis-title/m-p/845271#M23317</link>
      <description>&lt;P&gt;I have to make different vertical box plots for each PK parameter. The labels should be what I posted in paramf. So the y-axis label needs to be whatever the respective PK parameter is.&lt;/P&gt;</description>
      <pubDate>Sat, 19 Nov 2022 18:19:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Need-subscript-in-y-axis-title/m-p/845271#M23317</guid>
      <dc:creator>tarheel13</dc:creator>
      <dc:date>2022-11-19T18:19:42Z</dc:date>
    </item>
    <item>
      <title>Re: Need subscript in y-axis title</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Need-subscript-in-y-axis-title/m-p/845319#M23318</link>
      <description>&lt;P&gt;You want this ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
set sashelp.heart;
if bp_status='High' then paramf=1;
if bp_status='Normal' then paramf=2;
if bp_status='Optimal' then paramf=3;
run;



data _anno;
length label $ 200;
 x1space="datavalue"; y1space="layoutpercent";function="text";
textweight="normal"; textsize=12;textcolor="black"; width=200;
 x1=1; y1=2.5;label="AUC(*ESC*){sub '0-inf'} (h*ng/mL)"; output;
 x1=2;y1=2.5;label="AUC(*ESC*){sub '0-24'} (h*ng/mL)"; output;
 x1=3;y1=2.5;label="AUC(*ESC*){sub '0-t'} (h*ng/mL)"; output;

 run;

title ;
proc sgplot data=have  sganno=_anno noautolegend;   
vbox weight/category=paramf;
xaxis label=' ' display=(novalues);
yaxis label=' ';
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-1668932692756.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/77489i804B298772E10EDC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ksharp_0-1668932692756.png" alt="Ksharp_0-1668932692756.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 20 Nov 2022 08:24:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Need-subscript-in-y-axis-title/m-p/845319#M23318</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2022-11-20T08:24:23Z</dc:date>
    </item>
    <item>
      <title>Re: Need subscript in y-axis title</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Need-subscript-in-y-axis-title/m-p/845341#M23319</link>
      <description>&lt;P&gt;it is closer to what I am looking for but I need to use avalc as well. I am supposed to do vertical box plots of PK parameters by timepoint and ADA status (positive or negative). Each timepoint should be on a separate page. I'll take care of that with the by statement in sgplot. Y-axis label should be "PK Parameter (unit)".&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 20 Nov 2022 15:28:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Need-subscript-in-y-axis-title/m-p/845341#M23319</guid>
      <dc:creator>tarheel13</dc:creator>
      <dc:date>2022-11-20T15:28:11Z</dc:date>
    </item>
    <item>
      <title>Re: Need subscript in y-axis title</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Need-subscript-in-y-axis-title/m-p/845382#M23322</link>
      <description>Post your real data and a picture you want to see.&lt;BR /&gt;It is hard to understand what you want by your words.</description>
      <pubDate>Mon, 21 Nov 2022 03:12:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Need-subscript-in-y-axis-title/m-p/845382#M23322</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2022-11-21T03:12:53Z</dc:date>
    </item>
    <item>
      <title>Re: Need subscript in y-axis title</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Need-subscript-in-y-axis-title/m-p/845450#M23325</link>
      <description>&lt;P&gt;I have to work off of a shell and there is no picture. I have already posted what was in the shell.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Nov 2022 12:03:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Need-subscript-in-y-axis-title/m-p/845450#M23325</guid>
      <dc:creator>tarheel13</dc:creator>
      <dc:date>2022-11-21T12:03:01Z</dc:date>
    </item>
    <item>
      <title>Re: Need subscript in y-axis title</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Need-subscript-in-y-axis-title/m-p/845590#M23327</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/*
Then it is hard to help you . 
Ask your statistical who wrote this shell,what graph he want to look like.
You need know some sas programming to modify my code to suit your demand.
*/
data have;
set sashelp.heart(obs=1000);
if bp_status='High' then paramf=1;
if bp_status='Normal' then paramf=2;
if bp_status='Optimal' then paramf=3;
keep status paramf weight;
run;
proc sort data=have;by status;run;



data _anno;
length label $ 200;
 x1space="datavalue"; y1space="layoutpercent";function="text";anchor="top";
textweight="normal"; textsize=12;textcolor="black"; width=22;
 x1=1; y1=2;label="AUC(*ESC*){sub '0-inf'} (h*ng/mL)"; output;
 x1=2;y1=2;label="AUC(*ESC*){sub '0-24'} (h*ng/mL)"; output;
 x1=3;y1=2;label="AUC(*ESC*){sub '0-t'} (h*ng/mL)"; output;

 run;

option nobyline;
title "Status is : #byval1";
proc sgplot data=have pad=(bottom=40) sganno=_anno noautolegend;  
by status; 
vbox weight/category=paramf nofill nooutliers nomean;
scatter x=paramf y=weight/jitter ;
xaxis label=' ' display=(novalues noticks);
yaxis label="PK Parameter (unit)";
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-1669083453049.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/77531iB2271E5F6F5A492F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ksharp_0-1669083453049.png" alt="Ksharp_0-1669083453049.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ksharp_1-1669083465128.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/77532i589B044C508DAF7E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ksharp_1-1669083465128.png" alt="Ksharp_1-1669083465128.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Nov 2022 02:17:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Need-subscript-in-y-axis-title/m-p/845590#M23327</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2022-11-22T02:17:17Z</dc:date>
    </item>
  </channel>
</rss>

