<?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: Special Characters in Text in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Special-Characters-in-Text/m-p/697171#M20712</link>
    <description>&lt;P&gt;In your LABELATTRS, set FAMILY="Arial Unicode MS" and see if that look okay to you.&lt;/P&gt;</description>
    <pubDate>Fri, 06 Nov 2020 15:26:47 GMT</pubDate>
    <dc:creator>DanH_sas</dc:creator>
    <dc:date>2020-11-06T15:26:47Z</dc:date>
    <item>
      <title>Special Characters in Text</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Special-Characters-in-Text/m-p/696718#M20702</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to produce some figures for a manuscript I am working on and am trying to figure out a better way to do superscripting with axis or even category labels. Right now I create labels and then am using an annotate dataset to position superscripts. Its cumbersome and I assume there is a more streamlined way. Would love some help!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example from the code I'm working on:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;input y sys system$ SysOut AveOut;&lt;BR /&gt;length name $ 15;&lt;/P&gt;&lt;P&gt;Label SysOut = "Cropping System Output (Gcal ha )";&lt;BR /&gt;Label AveOut = "Mean Output (Gcal ha )";&lt;BR /&gt;&lt;BR /&gt;if sys=1 then do; name='Maize'; end;&lt;BR /&gt;if sys=2 then do; name='M-S'; end;&lt;BR /&gt;if sys=3 then do; name='M-S-W (org)'; end;&lt;BR /&gt;if sys=4 then do; name='M-a-A-A'; end;&lt;BR /&gt;if sys=5 then do; name='M-o/A-A (org)'; end;&lt;BR /&gt;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;data anno1;&lt;BR /&gt;length function $20. label $200.;&lt;/P&gt;&lt;P&gt;function="text"; label="(*ESC*){sup '-1'}";&lt;BR /&gt;rotate = 0;&lt;BR /&gt;X1 = 77; Y1 = 3; ANCHOR = "right";&lt;BR /&gt;width = 30; *TEXTSIZE = 11;&lt;BR /&gt;output;&lt;/P&gt;&lt;P&gt;function="text"; label="(*ESC*){sup '-1'}";&lt;BR /&gt;rotate = 90;&lt;BR /&gt;X1 = 2; Y1 = 87; ANCHOR = "right";&lt;BR /&gt;width = 30; *TEXTSIZE = 11;&lt;BR /&gt;output;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ods graphics / width = 4in height=4in noborder;&lt;BR /&gt;ods html dpi=200;&lt;BR /&gt;ods graphics on / noborder width = 4in height=4in outputfmt=png;&lt;BR /&gt;ods html dpi=500;&lt;/P&gt;&lt;P&gt;proc sgplot&lt;BR /&gt;data=FW&lt;BR /&gt;&lt;BR /&gt;description=" "&lt;BR /&gt;sganno=anno1;&lt;BR /&gt;title;&lt;/P&gt;&lt;P&gt;styleattrs&lt;BR /&gt;datasymbols=(circle diamond diamondfilled triangle trianglefilled)&lt;BR /&gt;datacontrastcolors=(red green orange blue gray);&lt;BR /&gt;xaxis labelattrs=(color=black size=11pt);&lt;BR /&gt;yaxis labelattrs=(color=black size=11pt);&lt;/P&gt;&lt;P&gt;reg x=AveOut y=SysOut / nomarkers group = sys;&lt;BR /&gt;scatter x=AveOut y=SysOut / group = name;&lt;BR /&gt;lineparm x=6 y=6 slope=1;&lt;BR /&gt;keylegend / position=top location=inside noborder EXCLUDE=("system" "1" "2" "3" "4" "5" "LineParm") ;&lt;BR /&gt;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and figure generated:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class="branch"&gt;&lt;DIV&gt;&lt;DIV class="c"&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Fig1.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/51387iD83EA5632936316F/image-size/large?v=v2&amp;amp;px=999" role="button" title="Fig1.png" alt="Fig1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 04 Nov 2020 23:00:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Special-Characters-in-Text/m-p/696718#M20702</guid>
      <dc:creator>grsanford</dc:creator>
      <dc:date>2020-11-04T23:00:16Z</dc:date>
    </item>
    <item>
      <title>Re: Special Characters in Text</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Special-Characters-in-Text/m-p/697018#M20703</link>
      <description>&lt;P&gt;Hi &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/259212"&gt;@grsanford&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You don't need to use annotate to do superscript. You can do it within the XAXIS and YAXIS statement.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Please see Dan Heath's blog on unicode:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://blogs.sas.com/content/graphicallyspeaking/2011/11/14/the-power-of-unicode/" target="_blank"&gt;https://blogs.sas.com/content/graphicallyspeaking/2011/11/14/the-power-of-unicode/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Nov 2020 22:18:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Special-Characters-in-Text/m-p/697018#M20703</guid>
      <dc:creator>djrisks</dc:creator>
      <dc:date>2020-11-05T22:18:13Z</dc:date>
    </item>
    <item>
      <title>Re: Special Characters in Text</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Special-Characters-in-Text/m-p/697148#M20708</link>
      <description>&lt;P&gt;I addition to what I described in the blog referred to by &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/10604"&gt;@djrisks&lt;/a&gt;&amp;nbsp;, you can now embed special characters (including superscript/subscript characters) in a format and have them honored in the graph. Here is an example using the "less than or equal to" character:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc format;
value agefmt 20-&amp;lt;30 = "20 (*ESC*){unicode '2264'x} 30"
             30-&amp;lt;40 = "30 (*ESC*){unicode '2264'x} 40"
             40-&amp;lt;50 = "40 (*ESC*){unicode '2264'x} 50"
             50-&amp;lt;60 = "50 (*ESC*){unicode '2264'x} 60"
             60-&amp;lt;70 = "60 (*ESC*){unicode '2264'x} 70"
;
run;

Title "Cholesterol Level by Age and Gender";
proc sgplot data=sashelp.heart;
format ageAtStart agefmt.;
vbox cholesterol / category=ageAtStart group=sex;
xaxistable cholesterol / stat=mean class=sex classdisplay=cluster location=inside
           label="Chol. (mean)";
keylegend / location=inside position=topright;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;In your case, you have a continuous axis, so this might not help you much; but you mentioned wanted to do this for categorical labels, so I wanted to mention this functionality for completeness.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks!&lt;/P&gt;
&lt;P&gt;Dan&lt;/P&gt;</description>
      <pubDate>Fri, 06 Nov 2020 14:14:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Special-Characters-in-Text/m-p/697148#M20708</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2020-11-06T14:14:50Z</dc:date>
    </item>
    <item>
      <title>Re: Special Characters in Text</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Special-Characters-in-Text/m-p/697160#M20711</link>
      <description>&lt;P&gt;Dan,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you very much. I am getting close but have run into an issue with superscript minus. You mention in your blog post the need to have a font style with a full suite of unicode characters. I assume that my currently problem is that I am not using an appropriate font. Can you help me understand how I can change that? Thank you again.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc sgplot&lt;BR /&gt;data=FW&lt;BR /&gt;&lt;BR /&gt;description=" ";&lt;BR /&gt;title;&lt;/P&gt;&lt;P&gt;styleattrs&lt;BR /&gt;datasymbols=(circle diamond diamondfilled triangle trianglefilled)&lt;BR /&gt;datacontrastcolors=(red green orange blue gray);&lt;BR /&gt;xaxis labelattrs=(color=black size=11pt) label= "Mean Output (Gcal ha (*ESC*){unicode '207B'x}(*ESC*){unicode '00B9'x})";&lt;BR /&gt;yaxis labelattrs=(color=black size=11pt) label= "System Output (Gcal ha (*ESC*){unicode '207B'x}(*ESC*){unicode '00B9'x})";&lt;/P&gt;&lt;P&gt;reg x=AveOut y=SysOut / nomarkers group = sys;&lt;BR /&gt;scatter x=AveOut y=SysOut / group = name;&lt;BR /&gt;lineparm x=6 y=6 slope=1;&lt;BR /&gt;keylegend / position=top location=inside noborder EXCLUDE=("system" "1" "2" "3" "4" "5" "LineParm") ; *valueattrs=(color=black size=11pt) ;&lt;BR /&gt;&lt;BR /&gt;run;&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="Fig1.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/51455i8AD3BC05BF23849D/image-size/large?v=v2&amp;amp;px=999" role="button" title="Fig1.png" alt="Fig1.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Nov 2020 15:00:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Special-Characters-in-Text/m-p/697160#M20711</guid>
      <dc:creator>grsanford</dc:creator>
      <dc:date>2020-11-06T15:00:14Z</dc:date>
    </item>
    <item>
      <title>Re: Special Characters in Text</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Special-Characters-in-Text/m-p/697171#M20712</link>
      <description>&lt;P&gt;In your LABELATTRS, set FAMILY="Arial Unicode MS" and see if that look okay to you.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Nov 2020 15:26:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Special-Characters-in-Text/m-p/697171#M20712</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2020-11-06T15:26:47Z</dc:date>
    </item>
    <item>
      <title>Re: Special Characters in Text</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Special-Characters-in-Text/m-p/697195#M20713</link>
      <description>&lt;P&gt;That worked brilliantly. Thank you.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Nov 2020 16:47:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Special-Characters-in-Text/m-p/697195#M20713</guid>
      <dc:creator>grsanford</dc:creator>
      <dc:date>2020-11-06T16:47:25Z</dc:date>
    </item>
  </channel>
</rss>

