<?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 Note: The log axis cannot support zero or negative values for the axis from plot data in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Note-The-log-axis-cannot-support-zero-or-negative-values-for-the/m-p/781045#M22338</link>
    <description>&lt;P&gt;I am trying to create a log graph using proc template. I have zero value in some variables. when I run the following I am getting a note&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" color="#0000FF"&gt;The log axis cannot support zero or negative values for the axis from plot data or due to default or assigned BASELINEINTERCEPT value. The axis type will be changed to&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" color="#0000FF"&gt;LINEAR&lt;/FONT&gt;.&lt;/P&gt;
&lt;P&gt;I tried options changing the values from zero to 1 (@rick_sas), I am still getinng the same note. Any advise on this please. I used proc template so far. So I was comfortable using. if no option left may be will go with SGPLOT( new to this).&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data mean;
input trtan time mean sd;
cards;
1 0 0 0
1 1 2.5 0.8
1 3 5 1.6
1 6 10 3.2
2 0 0 0
2 1 2.8 0.7
2 3 3.3 1.2
2 6 5.3 1.4
;
run;



data mean1;
set mean;
lower = MEAN - sd;
upper = MEAN + sd;
if mean=0 then do;
mean=.;
sd=.;
end;
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=('time') tickvalueattrs=(family='Courier New' size=8 ) labelattrs=(family='Courier New' size=8 )
										linearopts=( viewmin=1 viewmax=6 tickvaluesequence=( start=1 end=6 increment=1)))
							yaxisopts=( label=('time)')  labelattrs=(family='Courier New' size=8 ) tickvalueattrs=(family='Courier New' size=8 )
								type=log	
										linearopts=( viewmin=1 viewmax=10 tickvaluesequence=( start=0.0 end=10 increment=1)));
	         seriesplot x=time y= MEAN /   group=sex name='series' display=(markers) connectorder=xaxis ;
	         scatterplot x=time 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\chk1.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 15:18:21 GMT</pubDate>
    <dc:creator>SASuserlot</dc:creator>
    <dc:date>2021-11-18T15:18:21Z</dc:date>
    <item>
      <title>Note: The log axis cannot support zero or negative values for the axis from plot data</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Note-The-log-axis-cannot-support-zero-or-negative-values-for-the/m-p/781045#M22338</link>
      <description>&lt;P&gt;I am trying to create a log graph using proc template. I have zero value in some variables. when I run the following I am getting a note&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" color="#0000FF"&gt;The log axis cannot support zero or negative values for the axis from plot data or due to default or assigned BASELINEINTERCEPT value. The axis type will be changed to&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" color="#0000FF"&gt;LINEAR&lt;/FONT&gt;.&lt;/P&gt;
&lt;P&gt;I tried options changing the values from zero to 1 (@rick_sas), I am still getinng the same note. Any advise on this please. I used proc template so far. So I was comfortable using. if no option left may be will go with SGPLOT( new to this).&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data mean;
input trtan time mean sd;
cards;
1 0 0 0
1 1 2.5 0.8
1 3 5 1.6
1 6 10 3.2
2 0 0 0
2 1 2.8 0.7
2 3 3.3 1.2
2 6 5.3 1.4
;
run;



data mean1;
set mean;
lower = MEAN - sd;
upper = MEAN + sd;
if mean=0 then do;
mean=.;
sd=.;
end;
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=('time') tickvalueattrs=(family='Courier New' size=8 ) labelattrs=(family='Courier New' size=8 )
										linearopts=( viewmin=1 viewmax=6 tickvaluesequence=( start=1 end=6 increment=1)))
							yaxisopts=( label=('time)')  labelattrs=(family='Courier New' size=8 ) tickvalueattrs=(family='Courier New' size=8 )
								type=log	
										linearopts=( viewmin=1 viewmax=10 tickvaluesequence=( start=0.0 end=10 increment=1)));
	         seriesplot x=time y= MEAN /   group=sex name='series' display=(markers) connectorder=xaxis ;
	         scatterplot x=time 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\chk1.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 15:18:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Note-The-log-axis-cannot-support-zero-or-negative-values-for-the/m-p/781045#M22338</guid>
      <dc:creator>SASuserlot</dc:creator>
      <dc:date>2021-11-18T15:18:21Z</dc:date>
    </item>
    <item>
      <title>Re: Note: The log axis cannot support zero or negative values for the axis from plot data</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Note-The-log-axis-cannot-support-zero-or-negative-values-for-the/m-p/781406#M22351</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PROC SGPLOT is far "easier" than PROC TEMPLATE.&lt;/P&gt;
&lt;P&gt;I would make "standard" plots with PROC SGPLOT (PROC TEMPLATE is absolutely "overkill" for "standard" plots).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Anyway, I guess your "lower" is still &amp;lt;= 0.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;lower, mean and upper need to be &amp;gt; 0 to be able to use them on a log axis.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Koen&lt;/P&gt;</description>
      <pubDate>Fri, 19 Nov 2021 22:04:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Note-The-log-axis-cannot-support-zero-or-negative-values-for-the/m-p/781406#M22351</guid>
      <dc:creator>sbxkoenk</dc:creator>
      <dc:date>2021-11-19T22:04:34Z</dc:date>
    </item>
  </channel>
</rss>

