<?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 set number of decimal places on an axis using PROC SGPLOT in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/How-to-set-number-of-decimal-places-on-an-axis-using-PROC-SGPLOT/m-p/781440#M31788</link>
    <description>&lt;P&gt;How about setting valuesformat = data and using a format statement to set the actual format.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Like this&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data data_02_output;
input Obs Time Group $ mean_efflux std_efflux;
datalines;
1 1 A 9.56125 2.70856
2 1 B 9.50000 2.29669
3 2 A 9.40800 2.59412
4 2 B 9.54333 2.29103
5 3 A 9.30400 2.66388
6 3 B 9.68250 1.76490
;

PROC SGPLOT data=data_02_output;
   series x=time y=mean_efflux / lineattrs=(thickness=3px) group=group
      markers markerattrs=(size=10pt) DATALABEL DATALABELATTRS=(Color=grey Family="Arial" Size=12
        Style=Italic Weight=Bold);

   yaxis
    values=(5 to 15 BY 5) valuesformat = data label='Efflux (% efflux / 4 hours)'
    labelattrs=(size=12pt weight=bold color=gray33)
    valueattrs=(size=12pt weight=bold color=gray33)
    offsetmin=0 offsetmax=0 grid minor minorcount=1
    ;
    
   xaxis
    values=(1 to 3 BY 1) label='Visit Number'
    labelattrs=(size=12pt weight=bold color=gray33)
    valueattrs=(size=12pt weight=bold color=gray33)
    offsetmin=0 offsetmax=0 grid minor minorcount=1;
   
   TITLE "Change in Efflux Over Time (% efflux / 4 hours)";

   format mean_efflux 8.1;
RUN;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Sat, 20 Nov 2021 08:21:54 GMT</pubDate>
    <dc:creator>PeterClemmensen</dc:creator>
    <dc:date>2021-11-20T08:21:54Z</dc:date>
    <item>
      <title>How to set number of decimal places on an axis using PROC SGPLOT</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-set-number-of-decimal-places-on-an-axis-using-PROC-SGPLOT/m-p/781421#M31775</link>
      <description>&lt;P&gt;How can I set the number of decimal places for a particular axis when creating a line graph using PROC SGPLOT?&lt;/P&gt;
&lt;P&gt;I'd like to set it to 1 decimal place for the Y-axix (This syntax uses output means from PROC UNIVARIATE).&lt;/P&gt;
&lt;P&gt;I consulted &lt;A href="https://communities.sas.com/t5/Graphics-Programming/SGPLOT-yaxis-format-values/m-p/552520" target="_self"&gt;this post,&lt;/A&gt; but the "valuesformat=" option isn't working for me either.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Current graph (4 decimal places):&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2021-11-19 at 4.25.34 PM.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/65946iFA83EF806F077801/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Screen Shot 2021-11-19 at 4.25.34 PM.png" alt="Screen Shot 2021-11-19 at 4.25.34 PM.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;PROC SGPLOT data=data_02_output;
	series x=time y=mean_efflux / lineattrs=(thickness=3px) group=group
		markers markerattrs=(size=10pt) DATALABEL DATALABELATTRS=(Color=grey Family="Arial" Size=12
        Style=Italic Weight=Bold);

	yaxis
	 values=(5 to 15 BY 5) &lt;U&gt;&lt;A href="https://communities.sas.com/t5/Graphics-Programming/SGPLOT-yaxis-format-values/m-p/552520" target="_blank"&gt;&lt;STRONG&gt;valuesformat=3.1&lt;/STRONG&gt;&lt;/A&gt;&lt;/U&gt; label='Efflux (% efflux / 4 hours)'
	 labelattrs=(size=12pt weight=bold color=gray33)
	 valueattrs=(size=12pt weight=bold color=gray33)
	 offsetmin=0 offsetmax=0 grid minor minorcount=1
	 ;
	 
	xaxis
	 values=(1 to 3 BY 1) label='Visit Number'
	 labelattrs=(size=12pt weight=bold color=gray33)
	 valueattrs=(size=12pt weight=bold color=gray33)
	 offsetmin=0 offsetmax=0 grid minor minorcount=1;
	
	TITLE "Change in Efflux Over Time (% efflux / 4 hours)";

RUN;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;BR /&gt;1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;&lt;BR /&gt;68 &lt;BR /&gt;69 PROC SGPLOT data=data_02_output;&lt;BR /&gt;70 series x=time y=mean_efflux / lineattrs=(thickness=3px) group=group&lt;BR /&gt;71 markers markerattrs=(size=10pt) DATALABEL DATALABELATTRS=(Color=grey Family="Arial" Size=12&lt;BR /&gt;72 Style=Italic Weight=Bold);&lt;BR /&gt;73 &lt;BR /&gt;74 yaxis&lt;BR /&gt;75 values=(5 to 15 BY 5) valuesformat=4.2 label='Efflux (% efflux / 4 hours)'&lt;BR /&gt;___&lt;BR /&gt;22&lt;BR /&gt;200&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;ERROR 22-322: Syntax error, expecting one of the following: a name, a format name. &lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;ERROR 200-322: The symbol is not recognized and will be ignored.&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;76 labelattrs=(size=12pt weight=bold color=gray33)&lt;BR /&gt;77 valueattrs=(size=12pt weight=bold color=gray33)&lt;BR /&gt;78 offsetmin=0 offsetmax=0 grid minor minorcount=1&lt;BR /&gt;79 ;&lt;BR /&gt;80 &lt;BR /&gt;81 xaxis&lt;BR /&gt;82 values=(1 to 3 BY 1) label='Visit Number'&lt;BR /&gt;83 labelattrs=(size=12pt weight=bold color=gray33)&lt;BR /&gt;84 valueattrs=(size=12pt weight=bold color=gray33)&lt;BR /&gt;85 offsetmin=0 offsetmax=0 grid minor minorcount=1;&lt;BR /&gt;86 &lt;BR /&gt;87 TITLE "Change in Efflux Over Time (% efflux / 4 hours)";&lt;BR /&gt;88 &lt;BR /&gt;89 RUN;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;BR /&gt;NOTE: PROCEDURE SGPLOT used (Total process time):&lt;BR /&gt;real time 0.00 seconds&lt;BR /&gt;user cpu time 0.00 seconds&lt;BR /&gt;system cpu time 0.00 seconds&lt;BR /&gt;memory 487.43k&lt;BR /&gt;OS Memory 26020.00k&lt;BR /&gt;Timestamp 11/20/2021 12:12:27 AM&lt;BR /&gt;Step Count 191 Switch Count 1&lt;BR /&gt;Page Faults 0&lt;BR /&gt;Page Reclaims 51&lt;BR /&gt;Page Swaps 0&lt;BR /&gt;Voluntary Context Switches 7&lt;BR /&gt;Involuntary Context Switches 0&lt;BR /&gt;Block Input Operations 0&lt;BR /&gt;Block Output Operations 0&lt;BR /&gt;&lt;BR /&gt;90 &lt;BR /&gt;91 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;&lt;BR /&gt;101&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Data:&lt;/P&gt;
&lt;TABLE class="table" aria-label="Data Set WORK.DATA_02_OUTPUT"&gt;
&lt;THEAD&gt;
&lt;TR&gt;
&lt;TH class="r header" scope="col"&gt;Obs&lt;/TH&gt;
&lt;TH class="r header" scope="col"&gt;Time&lt;/TH&gt;
&lt;TH class="header" scope="col"&gt;Group&lt;/TH&gt;
&lt;TH class="r header" scope="col"&gt;mean_efflux&lt;/TH&gt;
&lt;TH class="r header" scope="col"&gt;std_efflux&lt;/TH&gt;
&lt;/TR&gt;
&lt;/THEAD&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TH class="r rowheader" scope="row"&gt;1&lt;/TH&gt;
&lt;TD class="r data"&gt;1&lt;/TD&gt;
&lt;TD class="data"&gt;A&lt;/TD&gt;
&lt;TD class="r data"&gt;9.56125&lt;/TD&gt;
&lt;TD class="r data"&gt;2.70856&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="r rowheader" scope="row"&gt;2&lt;/TH&gt;
&lt;TD class="r data"&gt;1&lt;/TD&gt;
&lt;TD class="data"&gt;B&lt;/TD&gt;
&lt;TD class="r data"&gt;9.50000&lt;/TD&gt;
&lt;TD class="r data"&gt;2.29669&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="r rowheader" scope="row"&gt;3&lt;/TH&gt;
&lt;TD class="r data"&gt;2&lt;/TD&gt;
&lt;TD class="data"&gt;A&lt;/TD&gt;
&lt;TD class="r data"&gt;9.40800&lt;/TD&gt;
&lt;TD class="r data"&gt;2.59412&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="r rowheader" scope="row"&gt;4&lt;/TH&gt;
&lt;TD class="r data"&gt;2&lt;/TD&gt;
&lt;TD class="data"&gt;B&lt;/TD&gt;
&lt;TD class="r data"&gt;9.54333&lt;/TD&gt;
&lt;TD class="r data"&gt;2.29103&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="r rowheader" scope="row"&gt;5&lt;/TH&gt;
&lt;TD class="r data"&gt;3&lt;/TD&gt;
&lt;TD class="data"&gt;A&lt;/TD&gt;
&lt;TD class="r data"&gt;9.30400&lt;/TD&gt;
&lt;TD class="r data"&gt;2.66388&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="r rowheader" scope="row"&gt;6&lt;/TH&gt;
&lt;TD class="r data"&gt;3&lt;/TD&gt;
&lt;TD class="data"&gt;B&lt;/TD&gt;
&lt;TD class="r data"&gt;9.68250&lt;/TD&gt;
&lt;TD class="r data"&gt;1.76490&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 20 Nov 2021 00:27:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-set-number-of-decimal-places-on-an-axis-using-PROC-SGPLOT/m-p/781421#M31775</guid>
      <dc:creator>_maldini_</dc:creator>
      <dc:date>2021-11-20T00:27:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to set number of decimal places on an axis using PROC SGPLOT</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-set-number-of-decimal-places-on-an-axis-using-PROC-SGPLOT/m-p/781440#M31788</link>
      <description>&lt;P&gt;How about setting valuesformat = data and using a format statement to set the actual format.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Like this&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data data_02_output;
input Obs Time Group $ mean_efflux std_efflux;
datalines;
1 1 A 9.56125 2.70856
2 1 B 9.50000 2.29669
3 2 A 9.40800 2.59412
4 2 B 9.54333 2.29103
5 3 A 9.30400 2.66388
6 3 B 9.68250 1.76490
;

PROC SGPLOT data=data_02_output;
   series x=time y=mean_efflux / lineattrs=(thickness=3px) group=group
      markers markerattrs=(size=10pt) DATALABEL DATALABELATTRS=(Color=grey Family="Arial" Size=12
        Style=Italic Weight=Bold);

   yaxis
    values=(5 to 15 BY 5) valuesformat = data label='Efflux (% efflux / 4 hours)'
    labelattrs=(size=12pt weight=bold color=gray33)
    valueattrs=(size=12pt weight=bold color=gray33)
    offsetmin=0 offsetmax=0 grid minor minorcount=1
    ;
    
   xaxis
    values=(1 to 3 BY 1) label='Visit Number'
    labelattrs=(size=12pt weight=bold color=gray33)
    valueattrs=(size=12pt weight=bold color=gray33)
    offsetmin=0 offsetmax=0 grid minor minorcount=1;
   
   TITLE "Change in Efflux Over Time (% efflux / 4 hours)";

   format mean_efflux 8.1;
RUN;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 20 Nov 2021 08:21:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-set-number-of-decimal-places-on-an-axis-using-PROC-SGPLOT/m-p/781440#M31788</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2021-11-20T08:21:54Z</dc:date>
    </item>
  </channel>
</rss>

