<?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: SAS GTL: Symbol (created by SymbolChar statement) moving on Y-Axis when increasing size in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/SAS-GTL-Symbol-created-by-SymbolChar-statement-moving-on-Y-Axis/m-p/749291#M21675</link>
    <description>&lt;P&gt;HOFFSET, VOFFSET, SIZE, SCALE and other options can be used to control the positioning of the symbol within the bounding box.&amp;nbsp; See doc at:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/grstatgraph/p0cf4zbevcqzxjn19w5berzi6ocd.htm" target="_blank"&gt;https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/grstatgraph/p0cf4zbevcqzxjn19w5berzi6ocd.htm&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 21 Jun 2021 15:46:14 GMT</pubDate>
    <dc:creator>Jay54</dc:creator>
    <dc:date>2021-06-21T15:46:14Z</dc:date>
    <item>
      <title>SAS GTL: Symbol (created by SymbolChar statement) moving on Y-Axis when increasing size</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SAS-GTL-Symbol-created-by-SymbolChar-statement-moving-on-Y-Axis/m-p/746978#M21672</link>
      <description>&lt;P&gt;Hi all, I have an issue using SymbolChar statement to define MARKERATTRS symbol value for a scatterplot.&lt;/P&gt;&lt;P&gt;When I increase the size of the symbol in MARKERATTRS, then the symbol is moving on the Y-Axis. it looks like the symbol has something like POSITION=BOTTOM whereas I'm expecting MIDDLE or CENTER value. I can try to decrease the impact by adding vertical offset to my symbol. But if anybody has an idea of what is happening and how to avoid this it would be great for me (I'm using SAS 9.4 9.4 (TS1M5)).&lt;/P&gt;&lt;P&gt;Thank you for reading.&lt;BR /&gt;Mickael&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;data WORK.PLOT ;&lt;BR /&gt;infile datalines4 dsd missover dlm=',' ;&lt;BR /&gt;length DAY GEOMEAN LCLM UCLM 8. ;&lt;BR /&gt;input DAY GEOMEAN LCLM UCLM ;&lt;BR /&gt;datalines4 ;&lt;BR /&gt;1,5.851,5.721,5.983&lt;BR /&gt;15,10.103,8.531,11.965&lt;BR /&gt;29,17.723,14.523,21.628&lt;BR /&gt;57,25.449,20.171,32.108&lt;BR /&gt;71,76.898,62.926,93.972&lt;BR /&gt;85,119.914,101.658,141.447&lt;BR /&gt;;;;;&lt;BR /&gt;run ;&lt;/P&gt;&lt;P&gt;** Style to be used for the plot ** ;&lt;BR /&gt;/*this SAS style can be used: STYLES.Journal;*/&lt;BR /&gt;ods path (PREPEND) WORK.GRAPH ;&lt;/P&gt;&lt;P&gt;proc template ;&lt;BR /&gt;define statgraph TestSymbolChar / store=WORK.GRAPH ;&lt;BR /&gt;mvar GraphTitle EmDashSize ;&lt;BR /&gt;dynamic XVar YMean YLowBound YUpBound ;&lt;BR /&gt;begingraph ;&lt;BR /&gt;symbolchar name=EmDash char='2014'x / /*textattrs=(size=20pt)*/ hoffset=0 voffset=0 /*+0.1*/ ;&lt;BR /&gt;entrytitle textattrs=(size=10pt weight=bold) GraphTitle ;&lt;BR /&gt;layout overlay / xaxisopts=(label='Day')&lt;BR /&gt;yaxisopts=(griddisplay=on type=log logopts=(base=10 Thresholdmax=1 Thresholdmin=1 minorticks=true minortickcount=8 minorgrid=true)&lt;BR /&gt;label='Geometric Mean (95%CI)' griddisplay=on) ;&lt;BR /&gt;scatterplot x=XVar y=YMean / markerattrs=(symbol=EmDash size=EmDashSize weight=bold color=black) errorbarcapshape=serif&lt;BR /&gt;errorbarattrs=(thickness=1pt color=black) yerrorlower=YLowBound yerrorupper=YUpBound name="GeoMean" ;&lt;BR /&gt;endlayout ;&lt;BR /&gt;endgraph ;&lt;BR /&gt;end ;&lt;BR /&gt;quit ;&lt;BR /&gt;*** Path of the template catalogs *** ;&lt;BR /&gt;ods path SASUSER.TEMPLAT(UPDATE) SASHELP.TMPLMST(READ) WORK.MYTEMP(READ) WORK.GRAPH(READ) ;&lt;/P&gt;&lt;P&gt;** SAS SGRender ** ;&lt;BR /&gt;%let EmDashSize= ;&lt;BR /&gt;%let GraphTitle=Using &amp;amp;EmDashSize. as a size for Symbol Char ;&lt;BR /&gt;%let FigureRoot=C:\Temp ;&lt;BR /&gt;option center ;&lt;BR /&gt;ods listing close ;&lt;BR /&gt;ods graphics on / reset=index imagename="TestSymbolCharEmpty" height=10cm width=16cm noborder ;&lt;BR /&gt;ods html style=styles.journal2 image_dpi=150 gpath="&amp;amp;FigureRoot." path="&amp;amp;FigureRoot." (url=none) file="output.html" ;&lt;/P&gt;&lt;P&gt;*goptions reset=all ;&lt;BR /&gt;ods graphics / outputfmt=png ;&lt;BR /&gt;&lt;BR /&gt;proc sgrender data=WORK.PLOT template=TestSymbolChar description='' ;&lt;BR /&gt;dynamic XVar='DAY' YMean='GEOMEAN' YLowBound='LCLM' YUpBound='UCLM' ;&lt;BR /&gt;run ;&lt;/P&gt;&lt;P&gt;ods html close ;&lt;BR /&gt;ods graphics off ;&lt;BR /&gt;ods listing ;&lt;/P&gt;&lt;P&gt;** SAS SGRender ** ;&lt;BR /&gt;%let EmDashSize=12pt ;&lt;BR /&gt;%let GraphTitle=Using &amp;amp;EmDashSize. as a size for Symbol Char ;&lt;BR /&gt;%let FigureRoot=C:\Temp ;&lt;BR /&gt;option center ;&lt;BR /&gt;ods listing close ;&lt;BR /&gt;ods graphics on / reset=index imagename="TestSymbolChar12pt" height=10cm width=16cm noborder ;&lt;BR /&gt;ods html style=styles.journal2 image_dpi=150 gpath="&amp;amp;FigureRoot." path="&amp;amp;FigureRoot." (url=none) file="output.html" ;&lt;/P&gt;&lt;P&gt;*goptions reset=all ;&lt;BR /&gt;ods graphics / outputfmt=png ;&lt;BR /&gt;&lt;BR /&gt;proc sgrender data=WORK.PLOT template=TestSymbolChar description='' ;&lt;BR /&gt;dynamic XVar='DAY' YMean='GEOMEAN' YLowBound='LCLM' YUpBound='UCLM' ;&lt;BR /&gt;run ;&lt;/P&gt;&lt;P&gt;ods html close ;&lt;BR /&gt;ods graphics off ;&lt;BR /&gt;ods listing ;&lt;/P&gt;&lt;P&gt;%let EmDashSize=18pt ;&lt;BR /&gt;%let GraphTitle=Using &amp;amp;EmDashSize. as a size for Symbol Char ;&lt;BR /&gt;%let FigureRoot=C:\Temp ;&lt;BR /&gt;option center ;&lt;BR /&gt;ods listing close ;&lt;BR /&gt;ods graphics on / reset=index imagename="TestSymbolChar18pt" height=10cm width=16cm noborder ;&lt;BR /&gt;ods html style=styles.journal2 image_dpi=150 gpath="&amp;amp;FigureRoot." path="&amp;amp;FigureRoot." (url=none) file="output.html" ;&lt;/P&gt;&lt;P&gt;*goptions reset=all ;&lt;BR /&gt;ods graphics / outputfmt=png ;&lt;BR /&gt;&lt;BR /&gt;proc sgrender data=WORK.PLOT template=TestSymbolChar description='' ;&lt;BR /&gt;dynamic XVar='DAY' YMean='GEOMEAN' YLowBound='LCLM' YUpBound='UCLM' ;&lt;BR /&gt;run ;&lt;/P&gt;&lt;P&gt;ods html close ;&lt;BR /&gt;ods graphics off ;&lt;BR /&gt;ods listing ;&lt;/P&gt;&lt;P&gt;%let EmDashSize=40 ;&lt;BR /&gt;%let GraphTitle=Using &amp;amp;EmDashSize. as a size for Symbol Char ;&lt;BR /&gt;%let FigureRoot=C:\Temp ;&lt;BR /&gt;option center ;&lt;BR /&gt;ods listing close ;&lt;BR /&gt;ods graphics on / reset=index imagename="TestSymbolChar4P0" height=10cm width=16cm noborder ;&lt;BR /&gt;ods html style=styles.journal2 image_dpi=150 gpath="&amp;amp;FigureRoot." path="&amp;amp;FigureRoot." (url=none) file="output.html" ;&lt;/P&gt;&lt;P&gt;*goptions reset=all ;&lt;BR /&gt;ods graphics / outputfmt=png ;&lt;BR /&gt;&lt;BR /&gt;proc sgrender data=WORK.PLOT template=TestSymbolChar description='' ;&lt;BR /&gt;dynamic XVar='DAY' YMean='GEOMEAN' YLowBound='LCLM' YUpBound='UCLM' ;&lt;BR /&gt;run ;&lt;/P&gt;&lt;P&gt;ods html close ;&lt;BR /&gt;ods graphics off ;&lt;BR /&gt;ods listing ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Jun 2021 10:27:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SAS-GTL-Symbol-created-by-SymbolChar-statement-moving-on-Y-Axis/m-p/746978#M21672</guid>
      <dc:creator>mborne</dc:creator>
      <dc:date>2021-06-10T10:27:55Z</dc:date>
    </item>
    <item>
      <title>Re: SAS GTL: Symbol (created by SymbolChar statement) moving on Y-Axis when increasing size</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SAS-GTL-Symbol-created-by-SymbolChar-statement-moving-on-Y-Axis/m-p/749192#M21673</link>
      <description>&lt;P&gt;Please post your code formatted, using the appropriate icon.&lt;/P&gt;</description>
      <pubDate>Mon, 21 Jun 2021 06:49:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SAS-GTL-Symbol-created-by-SymbolChar-statement-moving-on-Y-Axis/m-p/749192#M21673</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2021-06-21T06:49:58Z</dc:date>
    </item>
    <item>
      <title>Re: SAS GTL: Symbol (created by SymbolChar statement) moving on Y-Axis when increasing size</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SAS-GTL-Symbol-created-by-SymbolChar-statement-moving-on-Y-Axis/m-p/749240#M21674</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data WORK.PLOT ; 
  infile datalines4 dsd missover dlm=',' ;
  length DAY GEOMEAN LCLM UCLM 8. ;
  input DAY GEOMEAN LCLM UCLM ;
  datalines4 ;
1,5.851,5.721,5.983
15,10.103,8.531,11.965
29,17.723,14.523,21.628
57,25.449,20.171,32.108
71,76.898,62.926,93.972
85,119.914,101.658,141.447
;;;;
run ;

proc sql noprint ;
  select distinct DAY into :XAxisValues separated by ' ' from WORK.PLOT order by DAY ;
quit ;
%put XAxisValues: &amp;amp;XAxisValues. Days ;

** Style to be used for the plot ** ;
/*this SAS style can be used: STYLES.Journal;*/
ods path (PREPEND) WORK.GRAPH ;

proc template ;
  define statgraph TestSymbolChar / store=WORK.GRAPH ;
  mvar GraphTitle EmDashHexa EmDashSize XAxisValues ;
  nmvar SymVOffset ;
  dynamic XVar YMean YLowBound YUpBound ;
  begingraph ;
  symbolchar name=EmDash char=EmDashHexa / /*textattrs=(size=20pt)*/ hoffset=0 voffset=SymVOffset /*+0.1*/ ;
    entrytitle textattrs=(size=10pt weight=bold) GraphTitle ;
    layout overlay / xaxisopts=(label='Day' linearopts=(tickvaluelist=XAxisValues)) 
                     yaxisopts=(griddisplay=on type=log logopts=(base=10 Thresholdmax=1 Thresholdmin=1 minorticks=true minortickcount=8 minorgrid=true) 
                                label='Geometric Mean (95%CI)' griddisplay=on) ;
      scatterplot x=XVar y=YMean / markerattrs=(symbol=EmDash size=EmDashSize weight=bold color=black) errorbarcapshape=serif 
                                   errorbarattrs=(thickness=1pt color=black) yerrorlower=YLowBound yerrorupper=YUpBound name="GeoMean" ;
      referenceline y=77 / lineattrs=(color=red pattern=2) curvelabel='77' curvelabelattrs=(color=black size=6) ;
      referenceline y=120 / lineattrs=(color=red pattern=2) curvelabel='120' curvelabelattrs=(color=black size=6) ;
    endlayout ;
  endgraph ;
  end ;
quit ;
*** Path of the template catalogs *** ;
ods path SASUSER.TEMPLAT(UPDATE) SASHELP.TMPLMST(READ) WORK.MYTEMP(READ) WORK.GRAPH(READ) ;

%MACRO testSymbolChar(           /* Test different Symbol to show geometric mean as a straight line */
                      EmDashHexa=,  /* Hexadecimal code for symbol character */
                      EmDashSize=,  /* Size of the symbol character */
                      SymVOffset=0, /* Vertical Offset of the symbol character */
                      imagename=,   /* Name of the PNG file */
                      GraphTemplate=TestSymbolChar /* Template to use for SGRENDER */
                      ) ;
  %** SAS SGRender ** ;
  %let GraphTitle=Using &amp;amp;EmDashHexa. with &amp;amp;EmDashSize. as a size for Symbol Char ;
  %let FigureRoot=C:\Temp ;
  option center ;
  ods listing close ;
  ods graphics on / reset=index imagename="&amp;amp;imagename." height=10cm width=16cm noborder ;
  ods html style=styles.journal2 image_dpi=150 gpath="&amp;amp;FigureRoot." path="&amp;amp;FigureRoot." (url=none) file="output.html" ;

    %*goptions reset=all ;
    ods graphics / outputfmt=png ;
  
     proc sgrender data=WORK.PLOT template=&amp;amp;GraphTemplate. description='' ;
       dynamic XVar='DAY' YMean='GEOMEAN' YLowBound='LCLM' YUpBound='UCLM' ;  
     run ;

  ods html close ;
  ods graphics off ;
  ods listing ;
%MEND testSymbolChar ;
/*
%let EmDashHexa='2012'x ;* Figure Dash * ;
%let EmDashHexa='2013'x ;* En Dash * ;
%let EmDashHexa='2014'x ;* Em Dash * ;
%let EmDashHexa='2015'x ;* Horizontal Bar * ;
%let EmDashHexa='002D'x ;* Hyphen-Minus * ;
%let EmDashHexa='0336'x ;* Combining Long Stroke Overlay * ;
%let EmDashHexa='2500'x ;* Box Drawings Light Horizontal * ;
%let EmDashHexa='25AC'x ;* Black Rectangle * ;
%let EmDashHexa='A7F7'x ;* Undefined * ;
*/
%testSymbolChar(EmDashHexa=%bquote('2014'x),EmDashSize=%bquote(),imagename=TestEmDashSizeEmpty) ;
%testSymbolChar(EmDashHexa=%bquote('2014'x),EmDashSize=%bquote(12pt),imagename=TestEmDashSize12pt) ;
%testSymbolChar(EmDashHexa=%bquote('2014'x),EmDashSize=%bquote(40),imagename=TestEmDashSize40) ;

%testSymbolChar(EmDashHexa=%bquote('2015'x),EmDashSize=%bquote(),imagename=TestHBarSizeEmpty) ;
%testSymbolChar(EmDashHexa=%bquote('2015'x),EmDashSize=%bquote(12pt),imagename=TestHBarSize12pt) ;
%testSymbolChar(EmDashHexa=%bquote('2015'x),EmDashSize=%bquote(40),imagename=TestHBarSize40) ;

%testSymbolChar(EmDashHexa=%bquote('002D'x),EmDashSize=%bquote(),imagename=TestHyphenSizeEmpty) ;
%testSymbolChar(EmDashHexa=%bquote('002D'x),EmDashSize=%bquote(12pt),imagename=TestHyphenSize12pt) ;
%testSymbolChar(EmDashHexa=%bquote('002D'x),EmDashSize=%bquote(40),imagename=TestHyphenSize40) ;

%testSymbolChar(EmDashHexa=%bquote('0336'x),EmDashSize=%bquote(),imagename=TestCLSOSizeEmpty) ;
%testSymbolChar(EmDashHexa=%bquote('0336'x),EmDashSize=%bquote(12pt),imagename=TestCLSOSize12pt) ;
%testSymbolChar(EmDashHexa=%bquote('0336'x),EmDashSize=%bquote(40),imagename=TestCLSOSize40) ;

%testSymbolChar(EmDashHexa=%bquote('2012'x),EmDashSize=%bquote(),imagename=TestFigDashSizeEmpty) ;
%testSymbolChar(EmDashHexa=%bquote('2012'x),EmDashSize=%bquote(12pt),imagename=TestFigDashSize12pt) ;
%testSymbolChar(EmDashHexa=%bquote('2012'x),EmDashSize=%bquote(40),imagename=TestFigDashSize40) ;

%testSymbolChar(EmDashHexa=%bquote('2013'x),EmDashSize=%bquote(),imagename=TestEnDashSizeEmpty) ;
%testSymbolChar(EmDashHexa=%bquote('2013'x),EmDashSize=%bquote(12pt),imagename=TestEnDashSize12pt) ;
%testSymbolChar(EmDashHexa=%bquote('2013'x),EmDashSize=%bquote(40),imagename=TestEnDashSize40) ;

%testSymbolChar(EmDashHexa=%bquote('2500'x),EmDashSize=%bquote(),imagename=TestBDLHSizeEmpty) ;
%testSymbolChar(EmDashHexa=%bquote('2500'x),EmDashSize=%bquote(12pt),imagename=TestBDLHSize12pt) ;
%testSymbolChar(EmDashHexa=%bquote('2500'x),EmDashSize=%bquote(40),imagename=TestBDLHSize40) ;

%testSymbolChar(EmDashHexa=%bquote('25AC'x),EmDashSize=%bquote(),imagename=TestBlackRectizeEmpty) ;
%testSymbolChar(EmDashHexa=%bquote('25AC'x),EmDashSize=%bquote(12pt),imagename=TestBlackRectSize12pt) ;
%testSymbolChar(EmDashHexa=%bquote('25AC'x),EmDashSize=%bquote(40),imagename=TestBlackRectSize40) ;

%testSymbolChar(EmDashHexa=%bquote('A7F7'x),EmDashSize=%bquote(),imagename=TestUndefSizeEmpty) ;
%testSymbolChar(EmDashHexa=%bquote('A7F7'x),EmDashSize=%bquote(12pt),imagename=TestUndefSize12pt) ;
%testSymbolChar(EmDashHexa=%bquote('A7F7'x),EmDashSize=%bquote(40),imagename=TestUndefSize40) ;

/* Not so bad solution */
%testSymbolChar(EmDashHexa=%bquote('2500'x),EmDashSize=%bquote(20),imagename=TestBDLHSize20) ;
%testSymbolChar(EmDashHexa=%bquote('2014'x),EmDashSize=%bquote(20),SymVOffset=0.08,imagename=TestEmDashSize20Offset) ;

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Jun 2021 11:43:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SAS-GTL-Symbol-created-by-SymbolChar-statement-moving-on-Y-Axis/m-p/749240#M21674</guid>
      <dc:creator>mborne</dc:creator>
      <dc:date>2021-06-21T11:43:04Z</dc:date>
    </item>
    <item>
      <title>Re: SAS GTL: Symbol (created by SymbolChar statement) moving on Y-Axis when increasing size</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SAS-GTL-Symbol-created-by-SymbolChar-statement-moving-on-Y-Axis/m-p/749291#M21675</link>
      <description>&lt;P&gt;HOFFSET, VOFFSET, SIZE, SCALE and other options can be used to control the positioning of the symbol within the bounding box.&amp;nbsp; See doc at:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/grstatgraph/p0cf4zbevcqzxjn19w5berzi6ocd.htm" target="_blank"&gt;https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/grstatgraph/p0cf4zbevcqzxjn19w5berzi6ocd.htm&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Jun 2021 15:46:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SAS-GTL-Symbol-created-by-SymbolChar-statement-moving-on-Y-Axis/m-p/749291#M21675</guid>
      <dc:creator>Jay54</dc:creator>
      <dc:date>2021-06-21T15:46:14Z</dc:date>
    </item>
  </channel>
</rss>

