<?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: Unicode characters in proc sgplot tick marks in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Unicode-characters-in-proc-sgplot-tick-marks/m-p/594161#M18930</link>
    <description>&lt;P&gt;SUP and SUB are not currently supported for axis tick marks. You have to use the Unicode equivalents. In your case:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc format;
VALUE stdsb 
  -13.5 = "(*ESC*){Unicode mu}(*ESC*){Unicode '2080'x} - 2(*ESC*){Unicode sigma}"
   -9.0 = "(*ESC*){Unicode mu}(*ESC*){Unicode '2080'x} -  (*ESC*){Unicode sigma}"
   -4.5 = "(*ESC*){Unicode mu}(*ESC*){Unicode '2080'x}"
    0.0 = "(*ESC*){Unicode mu}(*ESC*){Unicode '2080'x} +  (*ESC*){Unicode sigma}"
    4.5 = "(*ESC*){Unicode mu}(*ESC*){Unicode '2080'x} + 2(*ESC*){Unicode sigma}"
;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Given that the "sub 0" is in the 2000 Unicode range, it is possible that the font you're using might not have that glyph (it will show up as a box). If that happens, we ship fonts that do support those glyphs. If the font you're using in your plot is a san-serif, try using "Arial Unicode MS", like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sgplot data=data1;
 series y=f x=X/group=pop;
 xaxis values=(-13.5 to 4.5 by 4.5) valuesformat=stdsb.
          valueattrs=(family="Arial Unicode MS" size=9pt);
 yaxis values=(0 to .2 by .02);
 where pop=2;
 footnote1 c=black 'Normal Distribution of X for one Population.';
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;For serif fonts, try "Times New Roman Uni".&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>Fri, 04 Oct 2019 17:28:41 GMT</pubDate>
    <dc:creator>DanH_sas</dc:creator>
    <dc:date>2019-10-04T17:28:41Z</dc:date>
    <item>
      <title>Unicode characters in proc sgplot tick marks</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Unicode-characters-in-proc-sgplot-tick-marks/m-p/594151#M18929</link>
      <description>&lt;P&gt;I want to create some graphs for different distributions using mu and sigma and other possible characters.&lt;/P&gt;&lt;P&gt;I'm starting with the normal distribution. The first format works in sgplot. The second format with subscripts doesn't work. What am I doing wrong. I am on SAS 9.4 M5 in the Windows 10 system.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;dm 'log;clear;out;clear;';

options nonumber nodate orientation=landscape ps=49 nodate;
ods html;

ods rtf file="C:\data\test.rtf";

data data1;
 sigma=9;
 pop=1;
 do X=sigma/2-3*sqrt(sigma) to sigma/2+3*sqrt(sigma) by .1;
  f=(1/sqrt(2*3.14159*sigma))*exp((-1/2/sigma)*(X-sigma/2)**2);
 output; end;
 pop=2;
 do X=-sigma/2-3*sqrt(sigma) to -sigma/2+3*sqrt(sigma) by .1;
  f=(1/sqrt(2*3.14159*sigma))*exp((-1/2/sigma)*(X+sigma/2)**2);
 output; end;
cards;
run;

proc format;
VALUE stds 
  -13.5 = "(*ESC*){Unicode mu} - 2(*ESC*){Unicode sigma}"
   -9.0 = "(*ESC*){Unicode mu} -  (*ESC*){Unicode sigma}"
   -4.5 = "(*ESC*){Unicode mu}"
    0.0 = "(*ESC*){Unicode mu} +  (*ESC*){Unicode sigma}"
    4.5 = "(*ESC*){Unicode mu} + 2(*ESC*){Unicode sigma}"
;
run;

proc format;
VALUE stdsb 
  -13.5 = "(*ESC*){Unicode mu}(*ESC*){sub 0} - 2(*ESC*){Unicode sigma}"
   -9.0 = "(*ESC*){Unicode mu}(*ESC*){sub 0} -  (*ESC*){Unicode sigma}"
   -4.5 = "(*ESC*){Unicode mu}(*ESC*){sub 0}"
    0.0 = "(*ESC*){Unicode mu}(*ESC*){sub 0} +  (*ESC*){Unicode sigma}"
    4.5 = "(*ESC*){Unicode mu}(*ESC*){sub 0} + 2(*ESC*){Unicode sigma}"
;
run;

data one;
  input x;
cards;
-13.5
-9.0
-4.5
0.0
4.5
;
run;

Title "Does the format work in a simple proc print";
title2 "Try the simpler format without subscripts first";
proc print data=one; var x; format x stds.; run;
title2 "Try the format with subscripts. Which works with proc print";
proc print data=one; var x; format x stdsb.; run;

goptions device=win hsize=7 vsize=7;
Title "Does the format work with sgplot";
title2 "Try the simpler format without subscripts first. Note this format works";
proc sgplot data=data1;
 series y=f x=X/group=pop;
 xaxis values=(-13.5 to 4.5 by 4.5) valuesformat=stds.;
 yaxis values=(0 to .2 by .02);
 where pop=2;
 footnote1 c=black 'Normal Distribution of X for one Population.';
run;

goptions device=win hsize=7 vsize=7;
Title "Does the format work with sgplot";
title2 "Try the format with subscripts. Note this format doesn't work";
proc sgplot data=data1;
 series y=f x=X/group=pop;
 xaxis values=(-13.5 to 4.5 by 4.5) valuesformat=stdsb.;
 yaxis values=(0 to .2 by .02);
 where pop=2;
 footnote1 c=black 'Normal Distribution of X for one Population.';
run;

ods rtf close;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Plot from first format:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Plot 1.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/32976i90631BD08888B54D/image-size/large?v=v2&amp;amp;px=999" role="button" title="Plot 1.png" alt="Plot 1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Plot from second format:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Plot 2.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/32977i1AF15974F8C0C2A2/image-size/large?v=v2&amp;amp;px=999" role="button" title="Plot 2.png" alt="Plot 2.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Oct 2019 16:05:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Unicode-characters-in-proc-sgplot-tick-marks/m-p/594151#M18929</guid>
      <dc:creator>JohnKeighley</dc:creator>
      <dc:date>2019-10-04T16:05:50Z</dc:date>
    </item>
    <item>
      <title>Re: Unicode characters in proc sgplot tick marks</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Unicode-characters-in-proc-sgplot-tick-marks/m-p/594161#M18930</link>
      <description>&lt;P&gt;SUP and SUB are not currently supported for axis tick marks. You have to use the Unicode equivalents. In your case:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc format;
VALUE stdsb 
  -13.5 = "(*ESC*){Unicode mu}(*ESC*){Unicode '2080'x} - 2(*ESC*){Unicode sigma}"
   -9.0 = "(*ESC*){Unicode mu}(*ESC*){Unicode '2080'x} -  (*ESC*){Unicode sigma}"
   -4.5 = "(*ESC*){Unicode mu}(*ESC*){Unicode '2080'x}"
    0.0 = "(*ESC*){Unicode mu}(*ESC*){Unicode '2080'x} +  (*ESC*){Unicode sigma}"
    4.5 = "(*ESC*){Unicode mu}(*ESC*){Unicode '2080'x} + 2(*ESC*){Unicode sigma}"
;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Given that the "sub 0" is in the 2000 Unicode range, it is possible that the font you're using might not have that glyph (it will show up as a box). If that happens, we ship fonts that do support those glyphs. If the font you're using in your plot is a san-serif, try using "Arial Unicode MS", like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sgplot data=data1;
 series y=f x=X/group=pop;
 xaxis values=(-13.5 to 4.5 by 4.5) valuesformat=stdsb.
          valueattrs=(family="Arial Unicode MS" size=9pt);
 yaxis values=(0 to .2 by .02);
 where pop=2;
 footnote1 c=black 'Normal Distribution of X for one Population.';
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;For serif fonts, try "Times New Roman Uni".&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>Fri, 04 Oct 2019 17:28:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Unicode-characters-in-proc-sgplot-tick-marks/m-p/594161#M18930</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2019-10-04T17:28:41Z</dc:date>
    </item>
    <item>
      <title>Re: Unicode characters in proc sgplot tick marks</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Unicode-characters-in-proc-sgplot-tick-marks/m-p/594168#M18931</link>
      <description>&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i don't have the support I did get a box.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think you have a typo in your proc sgplot. When I removed the , in valueattrs it ran perfectly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am only using the Unicode due to fact that this the first time that I have since code that gives SAS the ability to print these types of characters. Is there a better option?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;John&lt;/P&gt;</description>
      <pubDate>Fri, 04 Oct 2019 17:07:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Unicode-characters-in-proc-sgplot-tick-marks/m-p/594168#M18931</guid>
      <dc:creator>JohnKeighley</dc:creator>
      <dc:date>2019-10-04T17:07:06Z</dc:date>
    </item>
    <item>
      <title>Re: Unicode characters in proc sgplot tick marks</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Unicode-characters-in-proc-sgplot-tick-marks/m-p/594179#M18932</link>
      <description>&lt;P&gt;Fixed it &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Oct 2019 17:23:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Unicode-characters-in-proc-sgplot-tick-marks/m-p/594179#M18932</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2019-10-04T17:23:11Z</dc:date>
    </item>
  </channel>
</rss>

