<?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 Create Semi-log Graph using Proc template in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/How-to-Create-Semi-log-Graph-using-Proc-template/m-p/872407#M23712</link>
    <description>&lt;P&gt;Try the following y-axis options:&lt;/P&gt;&lt;P&gt;yaxisopts=( type=log tickvalueattrs=(family='Courier New' size=8 )&lt;BR /&gt;logopts=(base=10 tickvaluepriority=true tickintervalstyle=logexpand tickvaluelist=( 0.1 1 10 100 1000) minorticks=true)&lt;BR /&gt;label='weight' labelattrs=(family='Courier New' size=8 ) );&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below is the output:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="arenavino_0-1682546334687.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/83271iDC57FE9D902D28E7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="arenavino_0-1682546334687.png" alt="arenavino_0-1682546334687.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 26 Apr 2023 21:59:11 GMT</pubDate>
    <dc:creator>arenavino</dc:creator>
    <dc:date>2023-04-26T21:59:11Z</dc:date>
    <item>
      <title>How to Create Semi-log Graph using Proc template</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-Create-Semi-log-Graph-using-Proc-template/m-p/780915#M22328</link>
      <description>&lt;P&gt;I am trying to create a sem-log graph using proc template. I am able to create linear graph, but&amp;nbsp; How we can create it, I am new to how to derive geometric means, std and how they used&amp;nbsp; in semi -log graph and how to adjust the y axis values.&amp;nbsp; I also have another request ,how We&amp;nbsp; can adjust the legend highlighted in the image. I am looking to have legends one top of the other instead of horizontal. I really appreciate your help. Thanks&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#FF0000"&gt;Present legend alignment&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;---o--- F&amp;nbsp; &amp;nbsp;---*--- M&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#339966"&gt;Req legend alignment&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;---o--- F&lt;/P&gt;
&lt;P&gt;---*--- M&lt;/P&gt;
&lt;P&gt;Linear Graph Image&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SASuserlot_0-1637191756576.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/65857iB4BF78D105AB6DF4/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SASuserlot_0-1637191756576.png" alt="SASuserlot_0-1637191756576.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
proc means data = sashelp.class nway;
class age sex;
var weight;
output out= class_mean n=n mean= _MEAN std= sd ;
run;

data mean1;
set class_mean;

lower = _MEAN - sd;
upper = _MEAN - sd;
run;

ods path(prepend) work.templat(update);
proc template;
	define statgraph series;
	begingraph/ BORDER=False datasymbols=( circle Asterisk) ;
	   layout lattice / rowdatarange=data columndatarange=data rowgutter=10 columngutter=10;
	      layout overlay / xaxisopts=( label=('Age') tickvalueattrs=(family='Courier New' size=8 ) labelattrs=(family='Courier New' size=8 )
										linearopts=( viewmin=10 viewmax=20 tickvaluesequence=( start=0.0 end=20 increment=1)))
							yaxisopts=( label=('weight)') labelattrs=(family='Courier New' size=8 ) tickvalueattrs=(family='Courier New' size=8 )
										linearopts=( viewmin=40 viewmax=160.0 tickvaluesequence=( start=0.0 end=160.0 increment=20.0)));
	         seriesplot x=age y= _MEAN /   group=sex name='series' display=(markers) connectorder=xaxis ;
	         scatterplot x=age y= _MEAN /  yerrorupper = upper yerrorlower = lower group=trtan name='scatter';
	         discretelegend 'series' / opaque=false border=true halign=right valign=top displayclipped=true across=2 order=rowmajor location=inside titleattrs=(family='Courier New' size=8 );
	      endlayout;
	   endlayout;
	endgraph;
	end;
run;


ods graphics on/ width=9 in height=4.6 in   ;

options orientation = landscape errors = 2 missing = ' ' nofmterr ls = 175 validvarname = upcase nofmterr nobyline 
noquotelenmax ;
ods escapechar = '^';
ods results on; 
ods listing close; 
ods rtf file = "&amp;amp;location..\chk.rtf" 
						style = _table nogtitle nogfootnote;
	
proc sgrender data=mean1 template=series;

run;
ods rtf close;
ods listing close;

&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Nov 2021 23:33:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-Create-Semi-log-Graph-using-Proc-template/m-p/780915#M22328</guid>
      <dc:creator>SASuserlot</dc:creator>
      <dc:date>2021-11-17T23:33:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to Create Semi-log Graph using Proc template</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-Create-Semi-log-Graph-using-Proc-template/m-p/780921#M22330</link>
      <description>Modify your template, add type=log in yaxisopts statement and set across=1 in discretelegend statement.</description>
      <pubDate>Thu, 18 Nov 2021 01:29:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-Create-Semi-log-Graph-using-Proc-template/m-p/780921#M22330</guid>
      <dc:creator>whymath</dc:creator>
      <dc:date>2021-11-18T01:29:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to Create Semi-log Graph using Proc template</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-Create-Semi-log-Graph-using-Proc-template/m-p/780940#M22331</link>
      <description>&lt;P&gt;Thank you. You across option worked for me. However type= log is not creating the semi-log graph. it creating linear graph only can you please suggest where I am doing wrong. I don't see any error in log either.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Log&lt;/P&gt;
&lt;P&gt;***********************************************************&lt;/P&gt;
&lt;P&gt;63208&lt;BR /&gt;63209 proc means data = sashelp.class nway;&lt;BR /&gt;63210 class age sex;&lt;BR /&gt;63211 var weight;&lt;BR /&gt;63212 output out= class_mean n=n mean= _MEAN std= sd ;&lt;BR /&gt;63213 run;&lt;/P&gt;
&lt;P&gt;WARNING: No output destinations active.&lt;BR /&gt;NOTE: There were 19 observations read from the data set SASHELP.CLASS.&lt;BR /&gt;NOTE: The data set WORK.CLASS_MEAN has 11 observations and 7 variables.&lt;BR /&gt;NOTE: PROCEDURE MEANS used (Total process time):&lt;BR /&gt;real time 0.03 seconds&lt;BR /&gt;cpu time 0.03 seconds&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;63214&lt;BR /&gt;63215 data mean1;&lt;BR /&gt;63216 set class_mean;&lt;BR /&gt;63217&lt;BR /&gt;63218 lower = _MEAN - sd;&lt;BR /&gt;63219 upper = _MEAN - sd;&lt;BR /&gt;63220 run;&lt;/P&gt;
&lt;P&gt;NOTE: Missing values were generated as a result of performing an operation on missing values.&lt;BR /&gt;Each place is given by: (Number of times) at (Line):(Column).&lt;BR /&gt;4 at 63218:15 4 at 63219:15&lt;BR /&gt;NOTE: There were 11 observations read from the data set WORK.CLASS_MEAN.&lt;BR /&gt;NOTE: The data set WORK.MEAN1 has 11 observations and 9 variables.&lt;BR /&gt;NOTE: DATA statement used (Total process time):&lt;BR /&gt;real time 0.01 seconds&lt;BR /&gt;cpu time 0.01 seconds&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;63221&lt;BR /&gt;63222 ods path(prepend) work.templat(update);&lt;BR /&gt;63223 proc template;&lt;BR /&gt;63224 define statgraph series;&lt;BR /&gt;63225 begingraph/ BORDER=False datasymbols=( circle Asterisk) ;&lt;BR /&gt;63226 layout lattice / rowdatarange=data columndatarange=data rowgutter=10 columngutter=10;&lt;BR /&gt;63227 layout overlay / xaxisopts=( label=('Age') tickvalueattrs=(family='Courier New' size=8 ) labelattrs=(family='Courier New' size=8 )&lt;BR /&gt;63228 linearopts=( viewmin=10 viewmax=20 tickvaluesequence=( start=0.0 end=20 increment=1)))&lt;BR /&gt;63229 yaxisopts=( label=('weight)') type=log labelattrs=(family='Courier New' size=8 ) tickvalueattrs=(family='Courier New' size=8 )&lt;BR /&gt;63230 linearopts=( viewmin=40 viewmax=160.0 tickvaluesequence=( start=0.0 end=160.0 increment=20.0)));&lt;BR /&gt;63231 seriesplot x=age y= _MEAN / group=sex name='series' display=(markers) connectorder=xaxis ;&lt;BR /&gt;63232 scatterplot x=age y= _MEAN / yerrorupper = upper yerrorlower = lower group=trtan name='scatter';&lt;BR /&gt;63233 discretelegend 'series' / opaque=false border=true halign=right valign=top displayclipped=true across=2 order=rowmajor location=inside&lt;BR /&gt;63233 ! titleattrs=(family='Courier New' size=8 );&lt;BR /&gt;63234 endlayout;&lt;BR /&gt;63235 endlayout;&lt;BR /&gt;63236 endgraph;&lt;BR /&gt;63237 end;&lt;BR /&gt;NOTE: Overwriting existing template/link: Series&lt;BR /&gt;NOTE: STATGRAPH 'Series' has been saved to: WORK.TEMPLAT&lt;BR /&gt;63238 run;&lt;BR /&gt;NOTE: PROCEDURE TEMPLATE used (Total process time):&lt;BR /&gt;real time 0.01 seconds&lt;BR /&gt;cpu time 0.01 seconds&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;63239&lt;BR /&gt;63240&lt;BR /&gt;63241 ods graphics on/ width=9 in height=4.6 in ;&lt;BR /&gt;63242&lt;BR /&gt;63243 options orientation = landscape errors = 2 missing = ' ' nofmterr ls = 175 validvarname = upcase nofmterr nobyline&lt;BR /&gt;63244 noquotelenmax ;&lt;BR /&gt;63245 ods escapechar = '^';&lt;BR /&gt;63246 ods results on;&lt;BR /&gt;63247 ods listing close;&lt;BR /&gt;63248 ods rtf file = "&amp;amp;location\chk.rtf"&lt;BR /&gt;63249 style = rtf nogtitle nogfootnote;&lt;BR /&gt;NOTE: Writing RTF Body file:&amp;amp;location\chk.rtf&lt;BR /&gt;63250&lt;BR /&gt;63251 proc sgrender data=mean1 template=series;&lt;BR /&gt;63252&lt;BR /&gt;63253 run;&lt;/P&gt;
&lt;P&gt;NOTE: There were 11 observations read from the data set WORK.MEAN1.&lt;BR /&gt;NOTE: PROCEDURE SGRENDER used (Total process time):&lt;BR /&gt;real time 0.19 seconds&lt;BR /&gt;cpu time 0.12 seconds&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;63254 ods rtf close;&lt;BR /&gt;63255 ods listing close;&lt;/P&gt;
&lt;P&gt;******************************************&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
proc means data = sashelp.class nway;
class age sex;
var weight;
output out= class_mean n=n mean= _MEAN std= sd ;
run;

data mean1;
set class_mean;

lower = _MEAN - sd;
upper = _MEAN - sd;
run;

ods path(prepend) work.templat(update);
proc template;
	define statgraph series;
	begingraph/ BORDER=False datasymbols=( circle Asterisk) ;
	   layout lattice / rowdatarange=data columndatarange=data rowgutter=10 columngutter=10;
	      layout overlay / xaxisopts=( label=('Age') tickvalueattrs=(family='Courier New' size=8 ) labelattrs=(family='Courier New' size=8 )
										linearopts=( viewmin=10 viewmax=20 tickvaluesequence=( start=0.0 end=20 increment=1)))
							yaxisopts=( label=('weight)') type=log labelattrs=(family='Courier New' size=8 ) tickvalueattrs=(family='Courier New' size=8 )
										linearopts=( viewmin=40 viewmax=160.0 tickvaluesequence=( start=0.0 end=160.0 increment=20.0)));
	         seriesplot x=age y= _MEAN /   group=sex name='series' display=(markers) connectorder=xaxis ;
	         scatterplot x=age y= _MEAN /  yerrorupper = upper yerrorlower = lower group=trtan name='scatter';
	         discretelegend 'series' / opaque=false border=true halign=right valign=top displayclipped=true across=2 order=rowmajor location=inside titleattrs=(family='Courier New' size=8 );
	      endlayout;
	   endlayout;
	endgraph;
	end;
run;


ods graphics on/ width=9 in height=4.6 in   ;

options orientation = landscape errors = 2 missing = ' ' nofmterr ls = 175 validvarname = upcase nofmterr nobyline 
noquotelenmax ;
ods escapechar = '^';
ods results on; 
ods listing close; 
ods rtf file = "&amp;amp;location.\chk.rtf" 
						style = rtf  nogtitle nogfootnote;
	
proc sgrender data=mean1 template=series;

run;
ods rtf close;
ods listing close;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 18 Nov 2021 05:52:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-Create-Semi-log-Graph-using-Proc-template/m-p/780940#M22331</guid>
      <dc:creator>SASuserlot</dc:creator>
      <dc:date>2021-11-18T05:52:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to Create Semi-log Graph using Proc template</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-Create-Semi-log-Graph-using-Proc-template/m-p/781615#M22352</link>
      <description>&lt;P&gt;The code really worked for me:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc means data = sashelp.class nway;
class age sex;
var weight;
output out= class_mean n=n mean= _MEAN std= sd ;
run;

data mean1;
set class_mean;

lower = _MEAN - sd;
upper = _MEAN - sd;
run;

ods path(prepend) work.templat(update);
proc template;
	define statgraph series;
	begingraph/ BORDER=False datasymbols=( circle Asterisk) ;
	   layout lattice / rowdatarange=data columndatarange=data rowgutter=10 columngutter=10;
	      layout overlay / xaxisopts=( label=('Age') tickvalueattrs=(family='Courier New' size=8 ) labelattrs=(family='Courier New' size=8 )
										linearopts=( viewmin=10 viewmax=20 tickvaluesequence=( start=0.0 end=20 increment=1)))
							yaxisopts=( label=('weight)') type=log labelattrs=(family='Courier New' size=8 ) tickvalueattrs=(family='Courier New' size=8 )
										linearopts=( viewmin=40 viewmax=160.0 tickvaluesequence=( start=0.0 end=160.0 increment=20.0)));
	         seriesplot x=age y= _MEAN /   group=sex name='series' display=(markers) connectorder=xaxis ;
	         scatterplot x=age y= _MEAN /  yerrorupper = upper yerrorlower = lower group=trtan name='scatter';
	         discretelegend 'series' / opaque=false border=true halign=right valign=top displayclipped=true across=2 order=rowmajor location=inside titleattrs=(family='Courier New' size=8 );
	      endlayout;
	   endlayout;
	endgraph;
	end;
run;


ods graphics on/ width=9 in height=4.6 in   ;

options orientation = landscape errors = 2 missing = ' ' nofmterr ls = 175 validvarname = upcase nofmterr nobyline 
noquotelenmax ;
ods escapechar = '^';
ods results on; 
ods listing close; 
	
proc sgrender data=mean1 template=series;

run;
ods listing close;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="whymath_0-1637543485630.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/65988i2D82A2138E6D54EB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="whymath_0-1637543485630.png" alt="whymath_0-1637543485630.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Nov 2021 01:11:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-Create-Semi-log-Graph-using-Proc-template/m-p/781615#M22352</guid>
      <dc:creator>whymath</dc:creator>
      <dc:date>2021-11-22T01:11:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to Create Semi-log Graph using Proc template</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-Create-Semi-log-Graph-using-Proc-template/m-p/872407#M23712</link>
      <description>&lt;P&gt;Try the following y-axis options:&lt;/P&gt;&lt;P&gt;yaxisopts=( type=log tickvalueattrs=(family='Courier New' size=8 )&lt;BR /&gt;logopts=(base=10 tickvaluepriority=true tickintervalstyle=logexpand tickvaluelist=( 0.1 1 10 100 1000) minorticks=true)&lt;BR /&gt;label='weight' labelattrs=(family='Courier New' size=8 ) );&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below is the output:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="arenavino_0-1682546334687.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/83271iDC57FE9D902D28E7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="arenavino_0-1682546334687.png" alt="arenavino_0-1682546334687.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Apr 2023 21:59:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-Create-Semi-log-Graph-using-Proc-template/m-p/872407#M23712</guid>
      <dc:creator>arenavino</dc:creator>
      <dc:date>2023-04-26T21:59:11Z</dc:date>
    </item>
  </channel>
</rss>

