<?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 to get the subscript and superscript in proc sg plot. in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/How-to-get-the-subscript-and-superscript-in-proc-sg-plot/m-p/667491#M20176</link>
    <description>Thanks Chris. But I want to display in footnote. In my example ABx is a text in one column. Wherever ABx comes into picture x should be subscript of AB.</description>
    <pubDate>Tue, 07 Jul 2020 15:54:21 GMT</pubDate>
    <dc:creator>Luna0571</dc:creator>
    <dc:date>2020-07-07T15:54:21Z</dc:date>
    <item>
      <title>How to get the subscript and superscript in proc sg plot.</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-get-the-subscript-and-superscript-in-proc-sg-plot/m-p/667443#M20174</link>
      <description>I have tried every solution from the community. I am using SAS EG.&lt;BR /&gt;Ex: text to be displayed in graph is ABx . I want to display x as subscript in proc sg plot waterfall model.</description>
      <pubDate>Tue, 07 Jul 2020 14:07:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-get-the-subscript-and-superscript-in-proc-sg-plot/m-p/667443#M20174</guid>
      <dc:creator>Luna0571</dc:creator>
      <dc:date>2020-07-07T14:07:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the subscript and superscript in proc sg plot.</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-get-the-subscript-and-superscript-in-proc-sg-plot/m-p/667460#M20175</link>
      <description>&lt;P&gt;You want to display this in the axis label or in a data label? ODS allows for Unicode characters, including super/subscripts.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/* Define sample data for the plot */
data sample;
   do x=1 to 10; 
      y=int(ranuni(0)*100);
      output;
   end;
run;
/* Define the ODS escape character */
ods escapechar='^';

/* Define the attributes of the image file */
ods graphics / reset width=600px height=400px ;

title 'Using Subscripts and Superscripts';

proc sgplot data=sample;
   scatter x=x y=y / markerattrs=(symbol=circlefilled color=blue);

   /* Specify the 4-digit hex value for the subscript 2 and superscript 2 */
   xaxis label="H^{unicode '2082'x}O^{unicode '00b2'x}";
   /* Specify the 4-digit hex value for the superscript 2 and subscript 2 */
   yaxis label="N^{unicode '00b2'x}H^{unicode '2082'x}";
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ChrisHemedinger_0-1594133889891.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/46967iFEDC187C72F70EB1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ChrisHemedinger_0-1594133889891.png" alt="ChrisHemedinger_0-1594133889891.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jul 2020 14:58:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-get-the-subscript-and-superscript-in-proc-sg-plot/m-p/667460#M20175</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2020-07-07T14:58:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the subscript and superscript in proc sg plot.</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-get-the-subscript-and-superscript-in-proc-sg-plot/m-p/667491#M20176</link>
      <description>Thanks Chris. But I want to display in footnote. In my example ABx is a text in one column. Wherever ABx comes into picture x should be subscript of AB.</description>
      <pubDate>Tue, 07 Jul 2020 15:54:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-get-the-subscript-and-superscript-in-proc-sg-plot/m-p/667491#M20176</guid>
      <dc:creator>Luna0571</dc:creator>
      <dc:date>2020-07-07T15:54:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the subscript and superscript in proc sg plot.</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-get-the-subscript-and-superscript-in-proc-sg-plot/m-p/667497#M20177</link>
      <description>&lt;P&gt;A footnote in the graph, like an inset?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;   inset "Inset footnote for AB^{sub '2'} " 
         / textattrs=(size=12pt) position=bottomleft;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ChrisHemedinger_0-1594138367354.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/46971iC71893F21382A465/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ChrisHemedinger_0-1594138367354.png" alt="ChrisHemedinger_0-1594138367354.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jul 2020 16:12:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-get-the-subscript-and-superscript-in-proc-sg-plot/m-p/667497#M20177</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2020-07-07T16:12:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the subscript and superscript in proc sg plot.</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-get-the-subscript-and-superscript-in-proc-sg-plot/m-p/667498#M20178</link>
      <description>&lt;P&gt;Can you post your actual SGPLOT code?&amp;nbsp; No need for data but just want to see how many places you're talking about needing a subscript (different places need different methods).&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jul 2020 16:13:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-get-the-subscript-and-superscript-in-proc-sg-plot/m-p/667498#M20178</guid>
      <dc:creator>JeffMeyers</dc:creator>
      <dc:date>2020-07-07T16:13:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the subscript and superscript in proc sg plot.</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-get-the-subscript-and-superscript-in-proc-sg-plot/m-p/667501#M20179</link>
      <description>Hi Jeff.&lt;BR /&gt;Let me keep it simple.I have a text variable the values are A,B,C,D for A,B I wanna display superscript &amp;amp; subscript for C,D respectively.</description>
      <pubDate>Tue, 07 Jul 2020 16:21:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-get-the-subscript-and-superscript-in-proc-sg-plot/m-p/667501#M20179</guid>
      <dc:creator>Luna0571</dc:creator>
      <dc:date>2020-07-07T16:21:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the subscript and superscript in proc sg plot.</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-get-the-subscript-and-superscript-in-proc-sg-plot/m-p/667507#M20180</link>
      <description>&lt;P&gt;Here you go:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods escapechar="~";
footnote f="Monotype Sans WT J" "This is an AB~{unicode '2093'x}";
proc sgplot data=sashelp.class;
scatter x=weight y=height;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;This key is choosing the correct font. The "2093' glyph is not available in every font -- only in the more "full-featured" fonts. If you are using san-serif fonts in your output, the font in the programs should work well for you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps!&lt;/P&gt;
&lt;P&gt;Dan&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jul 2020 16:49:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-get-the-subscript-and-superscript-in-proc-sg-plot/m-p/667507#M20180</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2020-07-07T16:49:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the subscript and superscript in proc sg plot.</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-get-the-subscript-and-superscript-in-proc-sg-plot/m-p/667518#M20181</link>
      <description>&lt;P&gt;If you want to show super or subscripts in SGPLOT graph statements (TEXT, VBAR, etc.) then you need to find them in Unicode form (I think DAN found one for subscript x).&amp;nbsp; They still don't support direct super or subscripts in SGPLOT unfortunately.&amp;nbsp; If you can find the character you want though in Unicode form then you can use the following method to get the values into a graph statement:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://blogs.sas.com/content/sgf/2015/09/18/specifying-unicode-values-and-colors-is-easier-with-the-proc-sgplot-and-gtl/" target="_blank"&gt;https://blogs.sas.com/content/sgf/2015/09/18/specifying-unicode-values-and-colors-is-easier-with-the-proc-sgplot-and-gtl/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Basically instead of having character values that include the escape character and Unicode value you need to make a formatted variable where the format contains the escape character and Unicode value.&amp;nbsp; It's an extra step I feel should be removed at some point by SAS but for now that is how it works.&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jul 2020 17:35:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-get-the-subscript-and-superscript-in-proc-sg-plot/m-p/667518#M20181</guid>
      <dc:creator>JeffMeyers</dc:creator>
      <dc:date>2020-07-07T17:35:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the subscript and superscript in proc sg plot.</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-get-the-subscript-and-superscript-in-proc-sg-plot/m-p/667519#M20182</link>
      <description>&lt;P&gt;We do currently support sup/sub in INSET statements in SGPLOT (as&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/4"&gt;@ChrisHemedinger&lt;/a&gt;&amp;nbsp; demonstrated); but, in other string situations (title, footnote, axis labels, legend labels, etc.), you must use a Unicode character to get sup/sub.&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jul 2020 17:41:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-get-the-subscript-and-superscript-in-proc-sg-plot/m-p/667519#M20182</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2020-07-07T17:41:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the subscript and superscript in proc sg plot.</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-get-the-subscript-and-superscript-in-proc-sg-plot/m-p/972570#M25623</link>
      <description>&lt;P&gt;I apologize for jumping into a thread, but is there a way to get a subscript capital L?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Aug 2025 16:52:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-get-the-subscript-and-superscript-in-proc-sg-plot/m-p/972570#M25623</guid>
      <dc:creator>kivester</dc:creator>
      <dc:date>2025-08-13T16:52:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the subscript and superscript in proc sg plot.</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-get-the-subscript-and-superscript-in-proc-sg-plot/m-p/972596#M25625</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let label1=XAXIS Label(*ESC*){sub 'L'}  ;
%let label2=YAXIS Label(*ESC*){sup 'L'} ;
data _anno;
length label $ 200;
 drawspace="layoutpercent"; function="text"; textweight="normal"; textsize=12;textcolor="black"; width=200;
 x1=50; y1=2.5;label="&amp;amp;label1."; output;
 x1=2.5;  y1=50;rotate=90;label="&amp;amp;label2."; output;
 run;
proc sgplot data=sashelp.class sganno=_anno;   
scatter x=weight y=height;   
xaxis label=' ';
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-1755133450382.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/108992i72C7E5FBD1DCE27F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ksharp_0-1755133450382.png" alt="Ksharp_0-1755133450382.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Aug 2025 01:04:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-get-the-subscript-and-superscript-in-proc-sg-plot/m-p/972596#M25625</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2025-08-14T01:04:17Z</dc:date>
    </item>
  </channel>
</rss>

