<?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: Why does xaxis value not work in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Why-does-xaxis-value-not-work/m-p/704258#M215883</link>
    <description>That is correct. There is no value for 'severely abnormal' , I am trying to show a zero in that column and report the others but in a specific order.</description>
    <pubDate>Mon, 07 Dec 2020 19:33:34 GMT</pubDate>
    <dc:creator>GS2</dc:creator>
    <dc:date>2020-12-07T19:33:34Z</dc:date>
    <item>
      <title>Why does xaxis value not work</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Why-does-xaxis-value-not-work/m-p/704216#M215863</link>
      <description>&lt;P&gt;Using SAS 9.4&lt;/P&gt;
&lt;P&gt;I am running the following code:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc format;&lt;BR /&gt;value $ funcfmt "X"="A-Severly Abnormal"&lt;BR /&gt;"Abnormal"="B-Abnormal" &lt;BR /&gt;"Nearly normal"="C-Nearly normal" &lt;BR /&gt;"Normal"="D-Normal";&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;proc summary data= peroneal.labeled nway completetypes;&lt;BR /&gt;class ratecurrent_level_func / preloadfmt order=formated missing;&lt;BR /&gt;format ratecurrent_level_func $funcfmt.;&lt;BR /&gt;output out=counts;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;overall current level of function;&lt;BR /&gt;options reset=all ;&lt;BR /&gt;ods graphics on /&lt;BR /&gt;imagefmt=tiff&lt;BR /&gt;imagename="Overall, Current Level of Function"&lt;BR /&gt;width=15cm&lt;BR /&gt;noborder;&lt;BR /&gt;ods listing gpath= "path" image_dpi=300 ;&lt;BR /&gt;proc sgplot data=counts;&lt;BR /&gt;format ratecurrent_level_func $funcfmt.;&lt;BR /&gt;title 'Overall, Current Level of Function';&lt;BR /&gt;vbarparm category=ratecurrent_level_func response=_FREQ_ / nozerobars;&lt;BR /&gt;yaxis grid label='Percent';&lt;BR /&gt;xaxis values=("Severly Abnormal" "Abormal" "Nearly Normal" "Normal");&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;run;&lt;BR /&gt;ods graphics off;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am trying to get a bar graph with the data in order from severly abnormal, abnormal, nearly normal and normal. So I used the format to get the data in that order; however, I do not want "A-", "B-" etc precedding the value name so I used the xaxis values. When I do this it distorts the graph? Does anyone know what I am doing incorrectly? I have attached a word document with an example of each graph. The first one is correct other than the labels are inaccurate and the second is what happens when I add the xaxis values statement. Thank you&lt;/P&gt;</description>
      <pubDate>Mon, 07 Dec 2020 17:34:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Why-does-xaxis-value-not-work/m-p/704216#M215863</guid>
      <dc:creator>GS2</dc:creator>
      <dc:date>2020-12-07T17:34:31Z</dc:date>
    </item>
    <item>
      <title>Re: Why does xaxis value not work</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Why-does-xaxis-value-not-work/m-p/704225#M215866</link>
      <description>&lt;P&gt;I do not download attachments, as they can be a security threat. So please include your graph in your reply by clicking on the camera icon.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;however, I do not want "A-", "B-" etc precedding the value name&lt;/SPAN&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Then don't put them in your format. If you are putting them there to force the proper order on the x-axis, then in PROC SGPLOT you can use the VALUES= option of the XAXIS statement. There is an example here:&amp;nbsp;&lt;A href="https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.4&amp;amp;docsetId=grstatproc&amp;amp;docsetTarget=p07m2vpyq75fgan14m6g5pphnwlr.htm&amp;amp;locale=en#n09f4ln7jq8gkan1w2nhlkzjcrqza"&gt;https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.4&amp;amp;docsetId=grstatproc&amp;amp;docsetTarget=p07m2vpyq75fgan14m6g5pphnwlr.htm&amp;amp;locale=en#n09f4ln7jq8gkan1w2nhlkzjcrqza&lt;/A&gt;&amp;nbsp;(scroll down)&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Dec 2020 17:58:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Why-does-xaxis-value-not-work/m-p/704225#M215866</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-12-07T17:58:46Z</dc:date>
    </item>
    <item>
      <title>Re: Why does xaxis value not work</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Why-does-xaxis-value-not-work/m-p/704228#M215867</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SGPlot10.png" style="width: 640px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/52415i5BCF8FD83E6B5BF3/image-size/large?v=v2&amp;amp;px=999" role="button" title="SGPlot10.png" alt="SGPlot10.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SGPlot11.png" style="width: 640px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/52416iB79ADF8A1B5A3865/image-size/large?v=v2&amp;amp;px=999" role="button" title="SGPlot11.png" alt="SGPlot11.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The first is the correct version and my code will produce without the xaxis values statement. When I include xaxis value the second graph is produced&lt;/P&gt;</description>
      <pubDate>Mon, 07 Dec 2020 18:02:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Why-does-xaxis-value-not-work/m-p/704228#M215867</guid>
      <dc:creator>GS2</dc:creator>
      <dc:date>2020-12-07T18:02:21Z</dc:date>
    </item>
    <item>
      <title>Re: Why does xaxis value not work</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Why-does-xaxis-value-not-work/m-p/704230#M215869</link>
      <description>&lt;P&gt;Please show us the LOG from your code, starting at PROC FORMAT and then all the way down to the NOTES after PROC SGPLOT. Do not chop anything out.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Follow these instructions exactly: Copy the log as text, then paste it into the window that appears when you click on the &amp;lt;/&amp;gt; icon. &lt;STRONG&gt;DO NOT SKIP THIS STEP.&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Dec 2020 18:10:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Why-does-xaxis-value-not-work/m-p/704230#M215869</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-12-07T18:10:41Z</dc:date>
    </item>
    <item>
      <title>Re: Why does xaxis value not work</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Why-does-xaxis-value-not-work/m-p/704232#M215870</link>
      <description>&lt;PRE&gt;64  proc format;
2465      value $ funcfmt "X"="A-Severly Abnormal"
2466                      "Abnormal"="B-Abnormal"
2467                     "Nearly normal"="C-Nearly normal"
2468                     "Normal"="D-Normal";
NOTE: Format $FUNCFMT is already on the library WORK.FORMATS.
NOTE: Format $FUNCFMT has been output.
2469  run;

NOTE: PROCEDURE FORMAT used (Total process time):
      real time           0.00 seconds
      cpu time            0.01 seconds


2470
2471  proc summary data= peroneal.labeled nway completetypes;
2472     class ratecurrent_level_func / preloadfmt order=formated missing;
2473     format ratecurrent_level_func $funcfmt.;
2474     output out=counts;
2475  run;

NOTE: There were 51 observations read from the data set PERONEAL.LABELED.
NOTE: The data set WORK.COUNTS has 4 observations and 3 variables.
NOTE: PROCEDURE SUMMARY used (Total process time):
      real time           0.04 seconds
      cpu time            0.06 seconds


2476
2477  *overall current level of function;
2478  options reset=all ;
              -----
              13
ERROR 13-12: Unrecognized SAS option name RESET.
2479  ods graphics on /
2480  imagefmt=tiff
2481  imagename="Overall, Current Level of Function"
WARNING: The IMAGENAME option or the output name contains invalid characters. Overall_ Current
         Level of Function will be used as the image name prefix.
2482  width=15cm
2483  noborder;
2484  ods listing gpath= "C:\Users\gscar\Desktop\FA094 Peroneal Subluxation\Tables" image_dpi=300
2484! ;
2485  proc sgplot data=counts;
2486      format ratecurrent_level_func $funcfmt.;
2487      title 'Overall, Current Level of Function';
2488      vbarparm category=ratecurrent_level_func response=_FREQ_ / nozerobars;
2489      yaxis grid label='Percent';
2490      xaxis values=("Severly Abnormal" "Abormal" "Nearly Normal" "Normal");
2491  run;

NOTE: Writing HTML Body file: sashtml4.htm
NOTE: PROCEDURE SGPLOT used (Total process time):
      real time           0.83 seconds
      cpu time            0.50 seconds

WARNING: HTML4 destination does not support TIFF images. Using the default static format.
NOTE: Listing image output written to C:\Users\gscar\Desktop\FA094 Peroneal
      Subluxation\Tables\Overall_ Current Level of Function9.tiff.
NOTE: There were 4 observations read from the data set WORK.COUNTS.

2492  ods graphics off;











&lt;/PRE&gt;
&lt;P&gt;Log of the distorted graph above&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Log of correct graph below&lt;/P&gt;
&lt;PRE&gt;2493  proc format;
2494      value $ funcfmt "X"="A-Severly Abnormal"
2495                      "Abnormal"="B-Abnormal"
2496                     "Nearly normal"="C-Nearly normal"
2497                     "Normal"="D-Normal";
NOTE: Format $FUNCFMT is already on the library WORK.FORMATS.
NOTE: Format $FUNCFMT has been output.
2498  run;

NOTE: PROCEDURE FORMAT used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds


2499
2500  proc summary data= peroneal.labeled nway completetypes;
2501     class ratecurrent_level_func / preloadfmt order=formated missing;
2502     format ratecurrent_level_func $funcfmt.;
2503     output out=counts;
2504  run;

NOTE: There were 51 observations read from the data set PERONEAL.LABELED.
NOTE: The data set WORK.COUNTS has 4 observations and 3 variables.
NOTE: PROCEDURE SUMMARY used (Total process time):
      real time           0.05 seconds
      cpu time            0.06 seconds


2505
2506  *overall current level of function;
2507  options reset=all ;
              -----
              13
ERROR 13-12: Unrecognized SAS option name RESET.
2508  ods graphics on /
2509  imagefmt=tiff
2510  imagename="Overall, Current Level of Function"
WARNING: The IMAGENAME option or the output name contains invalid characters. Overall_ Current
         Level of Function will be used as the image name prefix.
2511  width=15cm
2512  noborder;
2513  ods listing gpath= "C:\Users\gscar\Desktop\FA094 Peroneal Subluxation\Tables" image_dpi=300
2513! ;
2514  proc sgplot data=counts;
2515      format ratecurrent_level_func $funcfmt.;
2516      title 'Overall, Current Level of Function';
2517      vbarparm category=ratecurrent_level_func response=_FREQ_ / nozerobars;
2518      yaxis grid label='Percent';
2519      *xaxis values=("Severly Abnormal" "Abormal" "Nearly Normal" "Normal");
2520  run;

NOTE: PROCEDURE SGPLOT used (Total process time):
      real time           0.23 seconds
      cpu time            0.09 seconds

WARNING: HTML4 destination does not support TIFF images. Using the default static format.
NOTE: Listing image output written to C:\Users\gscar\Desktop\FA094 Peroneal
      Subluxation\Tables\Overall_ Current Level of Function11.tiff.
NOTE: There were 4 observations read from the data set WORK.COUNTS.

2521  ods graphics off;
&lt;/PRE&gt;</description>
      <pubDate>Mon, 07 Dec 2020 18:17:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Why-does-xaxis-value-not-work/m-p/704232#M215870</guid>
      <dc:creator>GS2</dc:creator>
      <dc:date>2020-12-07T18:17:20Z</dc:date>
    </item>
    <item>
      <title>Re: Why does xaxis value not work</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Why-does-xaxis-value-not-work/m-p/704248#M215878</link>
      <description>&lt;P&gt;Eliminate the format. Do not apply it in PROC SUMMARY or anywhere else.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In PROC SGPLOT, use:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;xaxis values=("Severly Abnormal" "Abormal" "Nearly Normal" "Normal");&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;and make sure the spelling and capitalization in the XAXIS statement match &lt;STRONG&gt;exactly&lt;/STRONG&gt; what is in your data set&amp;nbsp;peroneal.labeled (there are at least two spelling errors and one place where the capitalization changes throughout your code, but the code must match the data)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Dec 2020 19:10:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Why-does-xaxis-value-not-work/m-p/704248#M215878</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-12-07T19:10:53Z</dc:date>
    </item>
    <item>
      <title>Re: Why does xaxis value not work</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Why-does-xaxis-value-not-work/m-p/704256#M215882</link>
      <description>&lt;P&gt;Don't apply the format if you do not want that appearance, or create a different format without the A- B- C-.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Spelling counts: Look closely at your Values and see if you find a spelling problem with the second value.&lt;/P&gt;
&lt;P&gt;Also from your format definition then there appears that you do not have a Value = "Severely Abnormal".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;From the documentation of the Values option in the Xaxis statement:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;DIV class="xis-eDocBody"&gt;
&lt;DIV class="xis-refProc"&gt;
&lt;DIV class="xis-procStatement"&gt;
&lt;DIV class="xis-procStatementSyntax"&gt;
&lt;DIV class="xis-syntaxDescription"&gt;
&lt;DIV class="xis-optionalArgGroup"&gt;
&lt;DIV id="n09f4ln7jq8gkan1w2nhlkzjcrqz" class="xis-argDescriptionPair"&gt;
&lt;DIV class="xis-argumentDescription"&gt;
&lt;DIV id="n1m6a4ebezsw2pn1lbo2ce9y40xj" class="xis-argDescriptionPair"&gt;
&lt;DIV class="xis-argumentDescription"&gt;
&lt;TABLE class="xis-summary"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD rowspan="2" class="xis-summaryInteraction"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xis-summaryText"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="xis-summaryText"&gt;If a custom format is applied to the value, the raw value is plotted first and then formatted.&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Which means that the VALUES you list must be exactly as they appear in the &lt;STRONG&gt;data&lt;/STRONG&gt; for character values. &lt;/P&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;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Dec 2020 19:26:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Why-does-xaxis-value-not-work/m-p/704256#M215882</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-12-07T19:26:58Z</dc:date>
    </item>
    <item>
      <title>Re: Why does xaxis value not work</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Why-does-xaxis-value-not-work/m-p/704258#M215883</link>
      <description>That is correct. There is no value for 'severely abnormal' , I am trying to show a zero in that column and report the others but in a specific order.</description>
      <pubDate>Mon, 07 Dec 2020 19:33:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Why-does-xaxis-value-not-work/m-p/704258#M215883</guid>
      <dc:creator>GS2</dc:creator>
      <dc:date>2020-12-07T19:33:34Z</dc:date>
    </item>
    <item>
      <title>Re: Why does xaxis value not work</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Why-does-xaxis-value-not-work/m-p/704288#M215896</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/194348"&gt;@GS2&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;That is correct. There is no value for 'severely abnormal' , I am trying to show a zero in that column and report the others but in a specific order.&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;You will need to use the PRELOADFMT option of the CLASS statement. Example: &lt;A href="https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.5&amp;amp;docsetId=proc&amp;amp;docsetTarget=n1eseaucwkzo18n1nph31op5kkdt.htm&amp;amp;locale=en#n1eseaucwkzo18n1nph31op5kkdt" target="_blank"&gt;https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.5&amp;amp;docsetId=proc&amp;amp;docsetTarget=n1eseaucwkzo18n1nph31op5kkdt.htm&amp;amp;locale=en#n1eseaucwkzo18n1nph31op5kkdt&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Dec 2020 21:28:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Why-does-xaxis-value-not-work/m-p/704288#M215896</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-12-07T21:28:57Z</dc:date>
    </item>
  </channel>
</rss>

