<?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 X-axis values not displaying in PROC SGPLOT in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/X-axis-values-not-displaying-in-PROC-SGPLOT/m-p/702862#M215295</link>
    <description>&lt;P&gt;Hello SAS Communities,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am working with a data set that is analysing diastolic blood pressure in different categories of ethnicity and race. I am wanting to create a Box Plot with PROC SGPLOT that displays Ethnicity on the X-axis and the diastolic blood pressure values on the Y-axis. I have been able to create a plot with all specifications that I desire, except the values and labels for the X-axis. These values do not display in the final output.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;My Question: How do I get the x-axis values to display? Why are they not displaying?&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the code that I have currently written in efforts to generate my plot. I have also included the current output that I am receiving from this code.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;PROC SGPLOT DATA = WORK.Analysis NOAUTOLEGEND;&lt;/DIV&gt;&lt;DIV&gt;VBOXDBP/GROUP = Ethnicity&lt;/DIV&gt;&lt;DIV&gt;FILLATTRS= (COLOR = BLUE)&lt;/DIV&gt;&lt;DIV&gt;LINEATTRS= (PATTERN = SOLID)&lt;/DIV&gt;&lt;DIV&gt;WHISKERATTRS= (COLOR = BLACK) ;&lt;/DIV&gt;&lt;DIV&gt;STYLEATTRSDATACONTRASTCOLORS= ( BLACK );&lt;/DIV&gt;&lt;DIV&gt;STYLEATTRS DATASYMBOLS= (CIRCLE);&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;REFLINE 90&lt;/DIV&gt;&lt;DIV&gt;/AXIS=Y&lt;/DIV&gt;&lt;DIV&gt;LINEATTRS=(COLOR=GREEN)&lt;/DIV&gt;&lt;DIV&gt;LABEL='Diastolic Value'&lt;/DIV&gt;&lt;DIV&gt;LABELLOC= INSIDE&lt;/DIV&gt;&lt;DIV&gt;LABELPOS= MIN;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;XAXISVALUES= ( ' ... ' )&lt;/DIV&gt;&lt;DIV&gt;OFFSETMIN= 0.2&lt;/DIV&gt;&lt;DIV&gt;OFFSETMAX = 0.2&lt;/DIV&gt;&lt;DIV&gt;LABEL= 'Ethnicity'&lt;/DIV&gt;&lt;DIV&gt;LABELATTRS= (WEIGHT= BOLD);&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;YAXISVALUES= (0 10 20 30 40 50 60 70 80 90 100 )&lt;/DIV&gt;&lt;DIV&gt;OFFSETMIN= 0&lt;/DIV&gt;&lt;DIV&gt;LABEL= 'Diastolic Measurement'&lt;/DIV&gt;&lt;DIV&gt;GRID&lt;/DIV&gt;&lt;DIV&gt;LABELATTRS= (WEIGHT= BOLD);&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;INSET'WORK.Analysis (As of November 11, 2004)'&lt;/DIV&gt;&lt;DIV&gt;/POSITION= BOTTOMRIGHT&lt;/DIV&gt;&lt;DIV&gt;BORDER&lt;/DIV&gt;&lt;DIV&gt;TITLE = 'Data Source:'&lt;/DIV&gt;&lt;DIV&gt;TITLEATTRS= (SIZE= 9 PT&lt;/DIV&gt;&lt;DIV&gt;WEIGHT= BOLD)&lt;/DIV&gt;&lt;DIV&gt;TEXTATTRS= (SIZE= 8 PT&lt;/DIV&gt;&lt;DIV&gt;STYLE= ITALIC);&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;RUN;&lt;/DIV&gt;&lt;DIV&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Thank you very much for all of your help in advance.&amp;nbsp;&lt;/P&gt;&lt;P&gt;- James&lt;/P&gt;&lt;/DIV&gt;</description>
    <pubDate>Thu, 10 Dec 2020 15:11:46 GMT</pubDate>
    <dc:creator>JamesPatton01</dc:creator>
    <dc:date>2020-12-10T15:11:46Z</dc:date>
    <item>
      <title>X-axis values not displaying in PROC SGPLOT</title>
      <link>https://communities.sas.com/t5/SAS-Programming/X-axis-values-not-displaying-in-PROC-SGPLOT/m-p/702862#M215295</link>
      <description>&lt;P&gt;Hello SAS Communities,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am working with a data set that is analysing diastolic blood pressure in different categories of ethnicity and race. I am wanting to create a Box Plot with PROC SGPLOT that displays Ethnicity on the X-axis and the diastolic blood pressure values on the Y-axis. I have been able to create a plot with all specifications that I desire, except the values and labels for the X-axis. These values do not display in the final output.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;My Question: How do I get the x-axis values to display? Why are they not displaying?&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the code that I have currently written in efforts to generate my plot. I have also included the current output that I am receiving from this code.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;PROC SGPLOT DATA = WORK.Analysis NOAUTOLEGEND;&lt;/DIV&gt;&lt;DIV&gt;VBOXDBP/GROUP = Ethnicity&lt;/DIV&gt;&lt;DIV&gt;FILLATTRS= (COLOR = BLUE)&lt;/DIV&gt;&lt;DIV&gt;LINEATTRS= (PATTERN = SOLID)&lt;/DIV&gt;&lt;DIV&gt;WHISKERATTRS= (COLOR = BLACK) ;&lt;/DIV&gt;&lt;DIV&gt;STYLEATTRSDATACONTRASTCOLORS= ( BLACK );&lt;/DIV&gt;&lt;DIV&gt;STYLEATTRS DATASYMBOLS= (CIRCLE);&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;REFLINE 90&lt;/DIV&gt;&lt;DIV&gt;/AXIS=Y&lt;/DIV&gt;&lt;DIV&gt;LINEATTRS=(COLOR=GREEN)&lt;/DIV&gt;&lt;DIV&gt;LABEL='Diastolic Value'&lt;/DIV&gt;&lt;DIV&gt;LABELLOC= INSIDE&lt;/DIV&gt;&lt;DIV&gt;LABELPOS= MIN;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;XAXISVALUES= ( ' ... ' )&lt;/DIV&gt;&lt;DIV&gt;OFFSETMIN= 0.2&lt;/DIV&gt;&lt;DIV&gt;OFFSETMAX = 0.2&lt;/DIV&gt;&lt;DIV&gt;LABEL= 'Ethnicity'&lt;/DIV&gt;&lt;DIV&gt;LABELATTRS= (WEIGHT= BOLD);&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;YAXISVALUES= (0 10 20 30 40 50 60 70 80 90 100 )&lt;/DIV&gt;&lt;DIV&gt;OFFSETMIN= 0&lt;/DIV&gt;&lt;DIV&gt;LABEL= 'Diastolic Measurement'&lt;/DIV&gt;&lt;DIV&gt;GRID&lt;/DIV&gt;&lt;DIV&gt;LABELATTRS= (WEIGHT= BOLD);&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;INSET'WORK.Analysis (As of November 11, 2004)'&lt;/DIV&gt;&lt;DIV&gt;/POSITION= BOTTOMRIGHT&lt;/DIV&gt;&lt;DIV&gt;BORDER&lt;/DIV&gt;&lt;DIV&gt;TITLE = 'Data Source:'&lt;/DIV&gt;&lt;DIV&gt;TITLEATTRS= (SIZE= 9 PT&lt;/DIV&gt;&lt;DIV&gt;WEIGHT= BOLD)&lt;/DIV&gt;&lt;DIV&gt;TEXTATTRS= (SIZE= 8 PT&lt;/DIV&gt;&lt;DIV&gt;STYLE= ITALIC);&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;RUN;&lt;/DIV&gt;&lt;DIV&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Thank you very much for all of your help in advance.&amp;nbsp;&lt;/P&gt;&lt;P&gt;- James&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 10 Dec 2020 15:11:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/X-axis-values-not-displaying-in-PROC-SGPLOT/m-p/702862#M215295</guid>
      <dc:creator>JamesPatton01</dc:creator>
      <dc:date>2020-12-10T15:11:46Z</dc:date>
    </item>
    <item>
      <title>Re: X-axis values not displaying in PROC SGPLOT</title>
      <link>https://communities.sas.com/t5/SAS-Programming/X-axis-values-not-displaying-in-PROC-SGPLOT/m-p/702865#M215298</link>
      <description>&lt;P&gt;Best practice is to show the code from the log with all warnings and notes. Copy the entire procedure or data step code with the notes. Then Paste into a code box opened with the &amp;lt;/&amp;gt; icon. This will preserve formatting of any diagnostic characters or text SAS provides some errors.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This also show us exactly the code that was submitted. Entirely too many times people edit the code and do not show what was actually submitted.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The XAXIS statement would need a space before the VALUES option and would typically generate an ERROR as in this example:&lt;/P&gt;
&lt;PRE&gt;151  proc sgplot data=sashelp.class;
152    scatter x=height y=weight;
153    xaxisvalues= (25 to 150 by 25);
       ------------
       1          22
                  76
WARNING 1-322: Assuming the symbol XAXIS was misspelled as
               xaxisvalues.
ERROR 22-322: Syntax error, expecting one of the following:
              RANGES, VALUES.
ERROR 76-322: Syntax error, statement will be ignored.
154  run;

&lt;/PRE&gt;
&lt;P&gt;See how the xaxisvalues is underlined? See the ERROR?&lt;/P&gt;
&lt;P&gt;So likely you are posting the result of different code than you show.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/343212"&gt;@JamesPatton01&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hello SAS Communities,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am working with a data set that is analysing diastolic blood pressure (DBP) in different categories of ethnicity and race (EthRaceCd). I am wanting to create a Box Plot with PROC SGPLOT that displays Ethnicity/Race Code on the X-axis and the DBP values on the Y-axis. I have been able to create a plot with all specifications that I desire, except the values and labels for the X-axis. These values do not display in the final output.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;My Question: How do I get the x-axis values to display? Why are they not displaying?&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For additional context, I am wanting to display character values on the X-axis that correspond to each box plot that are as follows from left to right where NH stands for Non-Hispanic:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Hispanic, NH Asian, NH Black, NH Other Race, NH White&amp;nbsp;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The first 10 observations of the dataset that I am working with are displayed below for reference. I have also attached this data file.&amp;nbsp;&lt;/P&gt;
&lt;P&gt; &lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2020-12-01 at 10.59.41.png" style="width: 681px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/52218i91BA55DE200A5B38/image-dimensions/681x228?v=v2" width="681" height="228" role="button" title="Screenshot 2020-12-01 at 10.59.41.png" alt="Screenshot 2020-12-01 at 10.59.41.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is the code that I have currently written in efforts to generate my plot. I have also included the current output that I am receiving from this code.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV&gt;TITLE1 "Diastolic Blood Pressure by Ethnicity/Race Code";&lt;/DIV&gt;
&lt;DIV&gt;PROC SGPLOT DATA = HypAnl.HypAnalysis1 NOAUTOLEGEND;&lt;/DIV&gt;
&lt;DIV&gt;VBOXDBP/GROUP = EthRaceCd&lt;/DIV&gt;
&lt;DIV&gt;FILLATTRS= (COLOR = LIGHTRED)&lt;/DIV&gt;
&lt;DIV&gt;LINEATTRS= (PATTERN = SOLID)&lt;/DIV&gt;
&lt;DIV&gt;WHISKERATTRS= (COLOR = BLACK) ;&lt;/DIV&gt;
&lt;DIV&gt;STYLEATTRSDATACONTRASTCOLORS= ( BLACK );&lt;/DIV&gt;
&lt;DIV&gt;STYLEATTRS DATASYMBOLS= (DIAMOND);&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;REFLINE 90&lt;/DIV&gt;
&lt;DIV&gt;/AXIS=Y&lt;/DIV&gt;
&lt;DIV&gt;LINEATTRS=(COLOR=RED)&lt;/DIV&gt;
&lt;DIV&gt;LABEL='Hypertension Threshold'&lt;/DIV&gt;
&lt;DIV&gt;LABELLOC= INSIDE&lt;/DIV&gt;
&lt;DIV&gt;LABELPOS= MIN;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;XAXISVALUES= ( 'Hispanic' 'NH Asian' 'NH Black' 'NH Other Race' 'NH White' )&lt;/DIV&gt;
&lt;DIV&gt;OFFSETMIN= 0.2&lt;/DIV&gt;
&lt;DIV&gt;OFFSETMAX = 0.2&lt;/DIV&gt;
&lt;DIV&gt;LABEL= 'Ethnicity/Race Group'&lt;/DIV&gt;
&lt;DIV&gt;LABELATTRS= (WEIGHT= BOLD);&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;YAXISVALUES= (0 10 20 30 40 50 60 70 80 90 100 )&lt;/DIV&gt;
&lt;DIV&gt;OFFSETMIN= 0&lt;/DIV&gt;
&lt;DIV&gt;LABEL= 'Latest DBP Meeasurement'&lt;/DIV&gt;
&lt;DIV&gt;GRID&lt;/DIV&gt;
&lt;DIV&gt;LABELATTRS= (WEIGHT= BOLD);&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;INSET'HypAnl.HypAnalysis1 (As of December 31, 2014)'&lt;/DIV&gt;
&lt;DIV&gt;/POSITION= BOTTOMRIGHT&lt;/DIV&gt;
&lt;DIV&gt;BORDER&lt;/DIV&gt;
&lt;DIV&gt;TITLE = 'Data Source:'&lt;/DIV&gt;
&lt;DIV&gt;TITLEATTRS= (SIZE= 9 PT&lt;/DIV&gt;
&lt;DIV&gt;WEIGHT= BOLD)&lt;/DIV&gt;
&lt;DIV&gt;TEXTATTRS= (SIZE= 8 PT&lt;/DIV&gt;
&lt;DIV&gt;STYLE= ITALIC);&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;RUN;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2020-12-01 at 11.03.24.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/52220i51917AC0B7681AD9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Screenshot 2020-12-01 at 11.03.24.png" alt="Screenshot 2020-12-01 at 11.03.24.png" /&gt;&lt;/span&gt;
&lt;P&gt; &lt;/P&gt;
&lt;P&gt;Thank you very much for all of your help in advance.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;- James&lt;/P&gt;
&lt;/DIV&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Dec 2020 18:31:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/X-axis-values-not-displaying-in-PROC-SGPLOT/m-p/702865#M215298</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-12-01T18:31:40Z</dc:date>
    </item>
    <item>
      <title>Re: X-axis values not displaying in PROC SGPLOT</title>
      <link>https://communities.sas.com/t5/SAS-Programming/X-axis-values-not-displaying-in-PROC-SGPLOT/m-p/702924#M215326</link>
      <description>&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Have you tried using CATEGORY = EthRaceCd rather than GROUP = EthRaceCd? By using CATEGORY = your box plots should be organized by the discrete variables&amp;nbsp;&lt;EM&gt;Hispanic, NH Asian, NH Black, NH Other Race, NH White.&amp;nbsp;&lt;/EM&gt;I would also recommend commenting out&amp;nbsp;VALUES= ( 'Hispanic' 'NH Asian' 'NH Black' 'NH Other Race' 'NH White' ) as that should not be necessary.&lt;/P&gt;</description>
      <pubDate>Tue, 01 Dec 2020 23:12:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/X-axis-values-not-displaying-in-PROC-SGPLOT/m-p/702924#M215326</guid>
      <dc:creator>steeleye</dc:creator>
      <dc:date>2020-12-01T23:12:58Z</dc:date>
    </item>
    <item>
      <title>Re: X-axis values not displaying in PROC SGPLOT</title>
      <link>https://communities.sas.com/t5/SAS-Programming/X-axis-values-not-displaying-in-PROC-SGPLOT/m-p/703225#M215452</link>
      <description>&lt;P&gt;I agree with what was mentioned, change group to category like this:&amp;nbsp;VBOX DBP / Category = EthRaceCd, then remove the line that states&amp;nbsp;&lt;SPAN&gt;XAXISVALUES= ( 'Hispanic' 'NH Asian' 'NH Black' 'NH Other Race' 'NH White' ) so it says&amp;nbsp; XAXIS OFFSETMIN = 0.1&lt;BR /&gt;LABEL = 'Ethnicity/Race Group'&lt;BR /&gt;LABELATTRS = ( WEIGHT = BOLD )&lt;BR /&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;then add a format at the end to change the axis name&amp;nbsp;FORMAT EthRaceCd $EthRaceCd.;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Hope that helps,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Neeloo&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Dec 2020 22:46:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/X-axis-values-not-displaying-in-PROC-SGPLOT/m-p/703225#M215452</guid>
      <dc:creator>neeloofar</dc:creator>
      <dc:date>2020-12-02T22:46:42Z</dc:date>
    </item>
  </channel>
</rss>

